/*
  home.css
  --------
  Styling specific to index.html: the showreel banner, the hero, and the
  featured-games section layout. Shared pieces (cards, buttons, testimonials)
  live in components.css.
*/

/* --- Showreel banner ------------------------------------------------------
   Sits between the header and <main>, full-bleed and sized close to a full
   1920x1080 (16:9) screen. */
.showreel-banner {
  width: 100%;
  background-color: var(--color-bg);
  border-bottom: 1px solid var(--color-border);
}

.showreel-video {
  display: block;
  width: 100%;
  aspect-ratio: 16 / 9;
  /* Almost full screen height, but capped so it never taller than the
     viewport (e.g. on narrow/tall phone screens where 100%-width * 16:9
     would otherwise overshoot). object-fit crops to fill either way, so
     this never letterboxes or distorts the footage. */
  max-height: 92vh;
  object-fit: cover;
  background-color: var(--color-surface);
}

/* The hero uses two layered pseudo-elements for its background texture
   instead of extra empty <div>s in the HTML:
     ::before - a slowly-hue-shifting radial gradient (the moody backdrop)
     ::after  - a faint grid-line pattern on top of it
   .hero-inner sits at a higher z-index so the text stays readable above
   both layers. */
.hero {
  position: relative;
  overflow: hidden;
  padding-block: var(--space-2xl) var(--space-xl);
  text-align: left;
}

.hero::before,
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 0;
}

.hero::before {
  background:
    linear-gradient(180deg, rgba(10, 11, 13, 0.2) 0%, rgba(10, 11, 13, 0.95) 92%),
    conic-gradient(from 180deg at 70% 40%, #10161c, #0d2630, #10161c, #0a1218);
  animation: hero-hue-shift 30s linear infinite;
}

.hero::after {
  background-image:
    linear-gradient(rgba(244, 245, 247, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(244, 245, 247, 0.04) 1px, transparent 1px);
  background-size: 64px 64px;
}

@keyframes hero-hue-shift {
  0% {
    filter: hue-rotate(0deg);
  }
  100% {
    filter: hue-rotate(-15deg);
  }
}

.hero-inner {
  position: relative;
  z-index: 1;
  max-width: 70ch;
  margin-inline: auto;
}

.hero h1 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: var(--space-md);
}

.hero p {
  font-size: var(--fs-base);
  margin-bottom: var(--space-lg);
}

.hero-actions {
  display: flex;
  justify-content: center;
  gap: var(--space-sm);
  flex-wrap: wrap;
}

/* .section-heading (Our Approach / Testimonials / Featured Games / Companies
   We've Worked With) defaults to centered, larger text in layout.css - that
   rule is shared across pages, so override it here rather than in
   layout.css to keep the change scoped to index.html only. */
.section-heading {
  text-align: left;
}

.section-heading p {
  margin-inline: 0;
}

.section-heading h2 {
  font-size: var(--fs-xl);
}

/* .kicker centers itself via flexbox (justify-content), independent of the
   surrounding text-align, so it needs its own override too. */
.section-heading .kicker,
.hero .kicker {
  justify-content: flex-start;
}

.featured-games-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--space-md);
}

/* --- Logo scroll (companies worked with) -----------------------------------
   Markup is generated by assets/js/logos-data.js: the track contains the
   logo list twice in a row, and the animation scrolls left by exactly 50%
   of the track's width before snapping back to 0% - since the second half
   is identical to the first, that snap is invisible and the strip appears
   to scroll forever. */
.logo-scroll-section {
  padding-block: var(--space-lg);
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
  background-color: var(--color-surface);
}

.logo-scroll-section .section-heading {
  margin-bottom: var(--space-md);
}

.logo-scroll {
  width: 100%;
  overflow: hidden;
  /* Fades the strip's edges so logos entering/leaving view fade in and out
     instead of being sliced off by a hard edge. */
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.logo-scroll-track {
  display: flex;
  align-items: center;
  gap: var(--space-xl);
  width: max-content;
  animation: logo-scroll 120s linear infinite;
}

/* Pause on hover so a visitor can actually look at a logo they're curious
   about instead of chasing a moving target. */
.logo-scroll:hover .logo-scroll-track {
  animation-play-state: paused;
}

.logo-scroll-track img {
  height: 144px;
  width: auto;
  max-width: 420px;
  flex-shrink: 0;
  object-fit: contain;
  padding: var(--space-sm) var(--space-md);                                                                                                                                                              
  background-color: var(--color-text);                                                                                                                                                                   
  border-radius: var(--radius-sm);  
}

@keyframes logo-scroll {
  from {
    transform: translateX(0);
  }
  to {
    transform: translateX(-50%);
  }
}
