/* =====================================
   HOME / LANDING PAGE  (Game For Friends)
   ===================================== */

/* Общий отступ секций */
.home-section {
  padding-block: 40px;
  padding-inline: 16px;
}

.home-section:nth-of-type(odd) {
  background: radial-gradient(circle at 0 0, rgba(56,189,248,0.10), transparent 55%);
}

.home-section:nth-of-type(even) {
  background: radial-gradient(circle at 100% 0, rgba(249,115,22,0.10), transparent 55%);
}

.home-section .container {
  max-width: 1200px;
  margin-inline: auto;
}

.gff-main {
  padding-top: 0 !important;
}

/* -------------------------------------
   HERO с фоновым видео — PRO version
   ------------------------------------- */

.home-hero {
  position: relative;
  min-height: 72vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  isolation: isolate;

  /* full-bleed */
  width: 100vw;
  max-width: 100vw;
  margin-inline: calc(50% - 50vw);

  background: #020617; /* критично: фон до загрузки видео */
}

.home-hero {
  margin-top: 0 !important;
}

/* ================= VIDEO WRAPPER ================= */

.home-hero-video {
  position: absolute;
  inset: 0;
  overflow: hidden;
  z-index: -2;
  background: #020617; /* защита от белого флеша */
}

/* ================= VIDEO ================= */

/* Видео ВСЕГДА есть, но сначала прозрачно */
.home-hero-video video {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;

  opacity: 0;
  transition: opacity 0.45s ease;
  will-change: opacity;
}

/* Когда видео готово → показываем */
.home-hero-video.is-ready video {
  opacity: 1;
}

/* Safari/iOS защита */
.home-hero-video video::-webkit-media-controls {
  display: none !important;
}

/* ================= OVERLAY ================= */

.home-hero-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;

  background:
    linear-gradient(
      to bottom,
      rgba(0,0,0,0.28),
      rgba(0,0,0,0.55)
    ),
    radial-gradient(
      circle at 20% 30%,
      rgba(0,0,0,0.22),
      transparent 60%
    ),
    radial-gradient(
      circle at 80% 70%,
      rgba(0,0,0,0.38),
      transparent 60%
    );
}

/* ================= CONTENT ================= */

.home-hero-inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.home-hero-inner .container {
  max-width: 860px;
  margin-inline: auto;
}

.home-hero-content {
  text-align: center;
}

/* ===== eyebrow ===== */

.home-eyebrow {
  display: inline-flex;
  padding: 4px 12px;
  margin-bottom: 12px;

  font-size: 0.78rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  border-radius: 999px;
  border: 1px solid rgba(255,255,255,0.35);
  background: rgba(255,255,255,0.1);
  backdrop-filter: blur(6px);

  color: #ffffff;
}

/* ===== title ===== */

.home-hero-title {
  margin: 8px 0 10px;

  font-size: clamp(2.4rem, 4.6vw, 3.4rem);
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;

  color: #ffffff;
  text-shadow:
    0 4px 18px rgba(0,0,0,0.65),
    0 0 32px rgba(0,0,0,0.55);
}

/* ===== subtitle ===== */

.home-hero-subtitle {
  max-width: 40rem;
  margin: 0 auto 22px;

  font-size: 1rem;
  color: rgba(255,255,255,0.92);
  text-shadow: 0 3px 12px rgba(0,0,0,0.5);
}

/* ===== CTA ===== */

.home-hero-cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: center;
  align-items: center;
  margin-bottom: 14px;
}

/* ===== meta ===== */

.home-hero-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 6px;

  font-size: 0.9rem;
  color: rgba(226,232,240,0.9);
}

.home-hero-meta .dot {
  opacity: 0.55;
}

/* ================= DESKTOP ================= */

@media (min-width: 768px) {
  .home-hero {
    min-height: 82vh;
  }
}

/* ================= REDUCED MOTION ================= */

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

/* -------------------------------------
   GFF кнопки — модификаторы для главной
   ------------------------------------- */

.gff-btn--hero {
  position: relative;
  overflow: hidden;
  padding-inline: 2.4rem;
  padding-block: 0.9rem;
  font-size: 1.05rem;
  z-index: 0;
}

/* мягкий "блик" внутри Play Now, который может:
   - жить своей жизнью (idle-аномция через JS, как раньше)
   - следовать за курсором при hover (через JS, см. ниже) */
.gff-btn--hero::before {
  content: "";
  position: absolute;
  inset: 0;
  /* центр блика — из CSS-переменных (либо idle, либо от мыши) */
  top: var(--sparkle-y, 50%);
  left: var(--sparkle-x, 50%);
  transform: translate(-50%, -50%) scale(0.25);
  width: 200%;
  height: 260%;
  background: radial-gradient(circle at center,
    rgba(248,250,252,0.85) 0,
    rgba(248,250,252,0.22) 26%,
    transparent 60%);
  opacity: 0;
  pointer-events: none;
  transition:
    opacity 0.35s ease-out,
    transform 0.35s ease-out;
  z-index: -1;
}

.gff-btn--hero:hover::before,
.gff-btn--hero:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, -50%) scale(1);
}

/* лёгкий glow по контуру при hover */
.gff-btn--hero:hover,
.gff-btn--hero:focus-visible {
  box-shadow:
    0 0 0 1px rgba(15,23,42,0.8),
    0 0 22px rgba(248,250,252,0.35),
    0 18px 40px rgba(15,23,42,0.95);
}

/* нудж, который вешает JS */
.gff-btn--hero.nudge {
  transform: translateY(-1px) scale(1.02);
  box-shadow: 0 18px 40px rgba(15,23,42,0.95);
}

/* вторичные кнопки (если понадобятся) */
.gff-btn--ghost {
  border: 1px solid rgba(148,163,184,0.6);
  background: rgba(15,23,42,0.6);
  color: #e5e7eb;
  box-shadow: 0 10px 24px rgba(15,23,42,0.9);
}

.gff-btn--ghost:hover {
  background: rgba(15,23,42,0.9);
  border-color: rgba(248,250,252,0.55);
  color: #f9fafb;
}

.gff-btn--ghost-sm {
  padding: 0.4rem 0.95rem;
  font-size: 0.85rem;
  border-radius: 999px;
  border: 1px solid rgba(148,163,184,0.5);
  background: rgba(15,23,42,0.85);
  color: #e5e7eb;
}

.gff-btn--ghost-sm:hover {
  transform: translateY(-1px);
  box-shadow:
    0 10px 30px rgba(0,0,0,0.75),
    0 0 0 1px rgba(248,250,252,0.45);
}

/* -------------------------------------
   Заголовки секций
   ------------------------------------- */

.home-section-header {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 22px;
}

.home-section-header--split {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.home-section-header--center {
  align-items: center;
  text-align: center;
}

.home-section-title {
  font-size: 1.4rem;
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}

.home-section-subtitle {
  margin: 0;
  max-width: 40rem;
  font-size: 0.95rem;
  color: var(--muted);
}

/* -------------------------------------
   Live Activity header — mobile (<=430px)
   ------------------------------------- */
@media (max-width: 430px) {
  /* заголовок + кнопка в колонку */
  .home-section-header--split {
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
  }

  /* кнопка "Create a room" по ширине блока */
  .home-section-header--split .gff-btn--ghost-sm {
    align-self: stretch;
    text-align: center;
    font-size: 0.8rem;
    padding: 0.45rem 0.9rem;
  }
}