/* ==========================================================================
   u7777 game — Homepage
   Hero · particles · OG banner showcase · game rail · screenshot slider
   ========================================================================== */

/* ================================ HERO ================================ */

.hero {
  position: relative;
  overflow: hidden;
  padding-block: clamp(2.5rem, 1.9rem + 3vw, 5rem) clamp(3rem, 2.2rem + 3.4vw, 5.5rem);
  background: var(--gradient-hero);
}
.hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: 0;
  height: 1px;
  background: var(--gradient-gold-line);
}
.hero .container { position: relative; z-index: var(--z-content); }

/* Ambient gold particle drift */
.hero-particles {
  position: absolute;
  inset: 0;
  z-index: var(--z-decor);
  overflow: hidden;
  pointer-events: none;
}
.hero-particles i {
  position: absolute;
  bottom: -12px;
  width: var(--s, 4px);
  height: var(--s, 4px);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(241, 201, 74, 0.95), rgba(212, 175, 55, 0));
  animation: driftUp var(--dur, 15s) linear var(--delay, 0s) infinite;
}

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(0, 0.92fr);
  grid-template-areas:
    "lede   visual"
    "offer  visual";
  column-gap: clamp(2rem, 1.2rem + 3vw, 4.5rem);
  row-gap: 0;
  align-items: center;
}
.hero-lede   { grid-area: lede; }
.hero-offer  { grid-area: offer; }
.hero-visual { grid-area: visual; }

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.42rem 0.95rem;
  margin-bottom: var(--sp-5);
  border-radius: var(--r-pill);
  border: 1px solid rgba(212, 175, 55, 0.36);
  background: rgba(212, 175, 55, 0.08);
  font-size: var(--fs-xs);
  font-weight: 600;
  letter-spacing: 0.05em;
  color: var(--color-accent);
  animation: fadeUp 700ms var(--ease-out) both;
}

.hero-title {
  font-size: var(--fs-display);
  margin-bottom: var(--sp-4);
  animation: heroTitleIn 900ms var(--ease-out) 100ms both;
}
.hero-title span { display: block; }

.hero-sub {
  max-width: 620px;
  margin-bottom: var(--sp-5);
  font-size: var(--fs-lead);
  line-height: 1.75;
  animation: fadeUp 800ms var(--ease-out) 220ms both;
}

.hero-bonus {
  display: inline-flex;
  align-items: center;
  gap: 0.95rem;
  padding: 0.85rem 1.35rem;
  margin-bottom: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid rgba(212, 175, 55, 0.42);
  background: linear-gradient(120deg, rgba(212, 175, 55, 0.16), rgba(212, 175, 55, 0.03));
  box-shadow: inset 0 0 30px rgba(212, 175, 55, 0.07);
  animation: fadeUp 800ms var(--ease-out) 300ms both;
}
.hero-bonus__amount {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 1.25rem + 1.5vw, 2.3rem);
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}
.hero-bonus__text {
  font-size: var(--fs-xs);
  line-height: 1.5;
  color: var(--color-text-secondary);
}
.hero-bonus__text b { display: block; color: var(--color-text-primary); font-size: var(--fs-sm); }

.hero-cta { animation: fadeUp 800ms var(--ease-out) 380ms both; }

.hero-tg-note {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-top: 0.9rem;
  font-size: var(--fs-xs);
  color: var(--color-text-muted);
  animation: fadeUp 800ms var(--ease-out) 460ms both;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem 1.4rem;
  margin-top: var(--sp-5);
  padding: 0;
  list-style: none;
  animation: fadeUp 800ms var(--ease-out) 540ms both;
}
.hero-trust li {
  display: flex;
  align-items: center;
  gap: 0.45rem;
  margin: 0;
  font-size: var(--fs-xs);
  font-weight: 600;
  color: var(--color-text-secondary);
}
.hero-trust svg { color: var(--color-accent); flex: none; }

.hero-visual { --phone-w: 300px; animation: fadeUp 900ms var(--ease-out) 300ms both; }

/* ======================== OG BANNER SHOWCASE ========================== */

.og-showcase { position: relative; }
.og-frame {
  position: relative;
  padding: clamp(0.5rem, 0.35rem + 0.6vw, 0.9rem);
  border-radius: var(--r-xl);
  border: 1px solid rgba(212, 175, 55, 0.4);
  background: linear-gradient(140deg, rgba(212, 175, 55, 0.16), rgba(19, 26, 46, 0.9) 45%, rgba(212, 175, 55, 0.1));
  box-shadow: var(--shadow-card), 0 0 60px rgba(212, 175, 55, 0.09);
  overflow: hidden;
}
.og-frame__inner {
  position: relative;
  border-radius: calc(var(--r-xl) - 8px);
  overflow: hidden;
  background: #0A0E1A;
}
.og-frame img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 900ms var(--ease-out);
}
.og-frame:hover img { transform: scale(1.025); }
.og-frame__shine {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: linear-gradient(105deg, transparent 32%, rgba(255, 255, 255, 0.14) 46%, transparent 60%);
  transform: translateX(-110%);
  animation: ogShine 6.5s var(--ease-out) 1.2s infinite;
}
@keyframes ogShine {
  0%   { transform: translateX(-110%); }
  22%  { transform: translateX(110%); }
  100% { transform: translateX(110%); }
}
.og-caption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.og-caption p { margin: 0; font-size: var(--fs-sm); max-width: 640px; }

/* ============================ GAME RAIL ============================== */

.rail-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
}
.rail-head .section-head { margin-bottom: 0; }

.game-rail {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(158px, 1fr);
  grid-template-rows: repeat(2, auto);
  gap: var(--sp-4);
  padding-bottom: var(--sp-4);
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scroll-snap-type: x proximity;
  scrollbar-width: thin;
}
.game-rail > * { scroll-snap-align: start; }

.rail-nav { display: flex; gap: 0.5rem; }
.rail-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: rgba(19, 26, 46, 0.85);
  color: var(--color-text-secondary);
  transition: border-color var(--t-fast) var(--ease), color var(--t-fast) var(--ease),
              transform var(--t-fast) var(--ease-out);
}
.rail-btn:hover { border-color: var(--color-accent); color: var(--color-accent); transform: translateY(-2px); }
.rail-btn:disabled { opacity: 0.35; cursor: default; transform: none; }

/* Asymmetric feature mosaic (desktop) */
.game-mosaic {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--sp-4);
}
.game-mosaic .game-card--tall { grid-row: span 2; }
.game-mosaic .game-card--tall .game-card__media { aspect-ratio: 211 / 545; }

/* ======================= SCREENSHOT SLIDER ========================== */

.shots {
  position: relative;
  overflow: hidden;
}
.shots-viewport {
  position: relative;
  width: 100%;
  overflow: hidden;
  padding-block: var(--sp-5);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 6%, #000 94%, transparent);
}
.shots-track {
  display: flex;
  gap: clamp(0.9rem, 0.7rem + 0.9vw, 1.6rem);
  transition: transform 620ms var(--ease-out);
  will-change: transform;
  cursor: grab;
}
.shots-track.is-dragging { cursor: grabbing; transition: none; }

.shot {
  position: relative;
  flex: 0 0 auto;
  width: clamp(168px, 14vw, 236px);
  border-radius: 26px;
  padding: 7px;
  background: linear-gradient(150deg, #2A3557 0%, #10152A 45%, #232C48 100%);
  box-shadow: 0 20px 44px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(212, 175, 55, 0.18);
  transition: transform var(--t-slow) var(--ease-out), box-shadow var(--t-slow) var(--ease),
              opacity var(--t-slow) var(--ease);
  opacity: 0.72;
  transform: scale(0.94);
}
.shot.is-active,
.shot:hover {
  opacity: 1;
  transform: scale(1);
  box-shadow: 0 26px 56px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(212, 175, 55, 0.5), var(--shadow-glow-gold);
}
.shot__screen {
  position: relative;
  border-radius: 20px;
  overflow: hidden;
  aspect-ratio: 480 / 1005;
  background: #0A0E1A;
}
.shot__screen img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top center;
  -webkit-user-drag: none;
  user-select: none;
}
.shot__notch {
  position: absolute;
  top: 11px;
  left: 50%;
  transform: translateX(-50%);
  width: 32%;
  height: 12px;
  border-radius: var(--r-pill);
  background: #080B15;
  z-index: 2;
}
.shot__caption {
  position: absolute;
  left: 7px;
  right: 7px;
  bottom: 7px;
  z-index: 3;
  padding: 0.55rem 0.7rem 0.5rem;
  border-radius: 0 0 20px 20px;
  background: linear-gradient(180deg, transparent, rgba(8, 11, 21, 0.94) 46%);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  color: var(--color-text-primary);
  text-align: center;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity var(--t-mid) var(--ease), transform var(--t-mid) var(--ease-out);
}
.shot.is-active .shot__caption,
.shot:hover .shot__caption { opacity: 1; transform: none; }

.shots-controls {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--sp-4);
  margin-top: var(--sp-5);
}
.shots-dots { display: flex; align-items: center; gap: 0.45rem; }
.shots-dots button {
  width: 8px;
  height: 8px;
  border-radius: var(--r-pill);
  background: var(--color-slate);
  transition: width var(--t-mid) var(--ease-out), background-color var(--t-mid) var(--ease);
}
.shots-dots button[aria-current="true"] { width: 26px; background: var(--gradient-gold); }

/* ========================= PROMO / BONUS GRID ======================== */

.promo-card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.65rem;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border);
  background: var(--gradient-surface);
  overflow: hidden;
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.promo-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--gradient-gold);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform var(--t-slow) var(--ease-out);
}
.promo-card:hover {
  transform: translateY(-6px);
  border-color: rgba(212, 175, 55, 0.5);
  box-shadow: var(--shadow-card-hover), var(--shadow-glow-gold);
}
.promo-card:hover::before { transform: scaleX(1); }
.promo-card__value {
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.95rem);
  line-height: 1;
}
.promo-card h3 { margin: 0; font-size: var(--fs-h4); font-family: var(--font-body); }
.promo-card p { margin: 0; font-size: var(--fs-sm); }
.promo-card__note {
  margin-top: auto;
  padding-top: 0.75rem;
  font-size: var(--fs-xxs);
  color: var(--color-text-muted);
  border-top: 1px solid var(--color-border);
}

/* ====================== TELEGRAM COMMUNITY CARDS ===================== */

.tg-card {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  padding: var(--sp-5);
  border-radius: var(--r-lg);
  border: 1px solid var(--color-border);
  background: linear-gradient(150deg, rgba(41, 169, 235, 0.09), rgba(19, 26, 46, 0.92));
  transition: transform var(--t-mid) var(--ease-out), border-color var(--t-mid) var(--ease),
              box-shadow var(--t-mid) var(--ease);
}
.tg-card:hover {
  transform: translateY(-6px);
  border-color: rgba(41, 169, 235, 0.55);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5), 0 0 30px rgba(41, 169, 235, 0.2);
}
.tg-card__icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 54px;
  height: 54px;
  border-radius: var(--r-md);
  background: rgba(41, 169, 235, 0.14);
  border: 1px solid rgba(41, 169, 235, 0.32);
  color: var(--color-telegram);
}
.tg-card h3 { margin: 0; font-size: var(--fs-h4); font-family: var(--font-body); }
.tg-card p { margin: 0; font-size: var(--fs-sm); }
.tg-card .btn { margin-top: auto; align-self: flex-start; }

/* ========================== APP TEASER BLOCK ========================= */

.app-teaser__icon {
  width: 96px;
  height: 96px;
  border-radius: 22px;
  border: 1px solid rgba(212, 175, 55, 0.4);
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.5), var(--shadow-glow-gold);
}
.app-meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 128px), 1fr));
  gap: 1px;
  margin-block: var(--sp-5);
  border: 1px solid var(--color-border);
  border-radius: var(--r-md);
  background: var(--color-border);
  overflow: hidden;
}
.app-meta div { padding: 0.85rem 1rem; background: var(--color-surface); }
.app-meta dt { font-size: var(--fs-xxs); letter-spacing: 0.08em; text-transform: uppercase; color: var(--color-text-muted); }
.app-meta dd { margin: 0.2rem 0 0; font-size: var(--fs-sm); font-weight: 700; color: var(--color-text-primary); }

/* ============================ RESPONSIVE ============================= */

@media (max-width: 980px) {
  /* Stack the hero as: pitch copy -> app mockup -> bonus & CTA, so the
     mockup sits directly above the offer instead of before everything. */
  .hero-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "lede" "visual" "offer";
  }
  .hero-visual { --phone-w: 268px; margin-block: 0.5rem 0.25rem; }
  .hero-sub, .hero-trust { margin-inline: auto; }
  .game-mosaic { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .game-mosaic .game-card--tall { grid-row: span 1; }
  .game-mosaic .game-card--tall .game-card__media { aspect-ratio: 211 / 260; }
}

@media (max-width: 620px) {
  .game-mosaic { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .game-rail { grid-auto-columns: minmax(140px, 1fr); }
  .og-caption { flex-direction: column; align-items: flex-start; }
  .hero-bonus { width: 100%; }
}

/* Phone-only: the hero CTAs default to --btn-lg, which is oversized once the
   row wraps to one column under a slim viewport. Shrink them specifically
   here rather than everywhere --btn-lg is used elsewhere on the site. */
@media (max-width: 640px) {
  .hero-offer .hero-cta { gap: 0.6rem; }
  .hero-offer .hero-cta .btn {
    padding: 0.72rem 1.3rem;
    font-size: 0.86rem;
  }
  .hero-offer .hero-cta .icon-telegram { width: 16px; height: 16px; }
  .hero-bonus { padding: 0.65rem 1rem; gap: 0.7rem; }
  .hero-bonus__amount { font-size: 1.35rem; }
}
