/* لایى‌بازی — لندینگ عمومی /game */

:root {
  /* پالت برند همراه‌مکانیک: آبی اصلی · قرمز · خاکستری */
  --brand-blue: #2b3991;
  --brand-red: #ed1b24;
  --brand-grey: #d3d3d3;

  --bg: #0e1220;
  --bg-soft: #161c2e;
  --bg-road: #1e2640;
  --bg-footer: #0a0d18;
  --bg-light: var(--brand-grey);
  --bg-light-card: #e4e4e4;
  --text: #f4f5f8;
  --text-muted: #b8bfd4;
  --text-body: #cfd4e4;
  --text-dark: #12152a;
  --text-dark-body: #2a2f45;
  --text-dark-muted: #5a6178;
  --border: #3a4568;
  --border-soft: #2c3554;
  --border-footer: #1a2140;
  --accent: var(--brand-red);
  --accent-hover: #ff3a42;
  --primary: var(--brand-blue);
  --primary-hover: #3848b0;
  /* یک ریل مشترک برای همترازی همهٔ سکشن‌ها در دسکتاپ */
  --max: 1280px;
  --page-gutter: clamp(24px, 3.5vw, 40px);
  --radius-lg: 28px;
  --radius-md: 14px;
  --radius-sm: 12px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.game-landing {
  margin: 0;
  min-height: 100vh;
  font-family: Vazirmatn, Tahoma, sans-serif;
  color: var(--text);
  background: var(--bg);
  line-height: 1.8;
}

/* React Bits AnimatedContent (vanilla) — hide until GSAP reveals */
[data-animated-content] {
  visibility: hidden;
}

@media (prefers-reduced-motion: reduce) {
  [data-animated-content] {
    visibility: visible;
  }
}

a {
  color: var(--accent);
}

a:hover {
  color: var(--accent-hover);
}

.container {
  width: 100%;
  max-width: var(--max);
  margin-inline: auto;
  padding-inline: var(--page-gutter);
  box-sizing: border-box;
}

/* —— نروبنر —— */
.promo-bar {
  background: var(--primary);
  color: #fff;
}

.promo-bar__inner {
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 64px;
  padding-block: 8px;
}

.promo-bar__ticker {
  flex: 1 1 auto;
  min-width: 0;
  position: relative;
  height: 48px;
  overflow: hidden;
  font-weight: 900;
  font-size: 20px;
}

.promo-bar__frame {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  animation: bannerframe 9s infinite;
}

.promo-bar__frame--2 {
  animation-delay: 3s;
}

.promo-bar__frame--3 {
  animation-delay: 6s;
}

@keyframes bannerframe {
  0% {
    opacity: 0;
    transform: translateY(8px);
  }
  4% {
    opacity: 1;
    transform: none;
  }
  30% {
    opacity: 1;
    transform: none;
  }
  34% {
    opacity: 0;
    transform: translateY(-8px);
  }
  100% {
    opacity: 0;
  }
}

.promo-bar__cta {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 22px;
  border-radius: var(--radius-sm);
  background: var(--accent);
  color: #fff;
  font-weight: 700;
  font-size: 16px;
  text-decoration: none;
}

.promo-bar__cta:hover {
  color: #fff;
  background: var(--accent-hover);
}

/* —— هدر —— */
.site-header {
  padding: 20px 0;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.site-header__brand {
  font-weight: 900;
  font-size: 22px;
  color: var(--text);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.site-header__brand:hover {
  color: var(--text);
}

.site-header__brand img {
  height: 40px;
  width: auto;
  display: block;
}

.site-header__nav {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  font-size: 15px;
}

.site-header__nav a {
  color: var(--text-muted);
  text-decoration: none;
}

.site-header__nav a:hover {
  color: var(--accent);
}

/* —— هیرو: یک ترکیب — برند + اسلات ویدیو ۹:۱۶ —— */
.hero {
  position: relative;
  padding: 28px 0 64px;
  /* visible so ElectricLogo arcs aren’t clipped into a rectangle */
  overflow: visible;
  perspective: 900px;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 55% 70% at 18% 45%, rgba(43, 57, 145, 0.28), transparent 58%),
    radial-gradient(ellipse 45% 60% at 82% 42%, rgba(237, 27, 36, 0.12), transparent 55%),
    linear-gradient(180deg, #0e1220 0%, #141a30 55%, #0e1220 100%);
  pointer-events: none;
  z-index: 0;
}

.hero__grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(240px, 0.85fr);
  align-items: center;
  gap: 28px 40px;
  min-height: min(58vh, 520px);
}

.hero__intro {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 18px;
  min-width: 0;
}

.hero__orb {
  position: relative;
  /* عریض + کمی ارتفاع اضافه برای قوس‌های ElectricLogo */
  width: clamp(260px, 32vw, 400px);
  aspect-ratio: 954 / 500;
  touch-action: none;
  flex: 0 0 auto;
  overflow: visible;
}

.hero__logo {
  position: absolute;
  inset: 14% 4%;
  z-index: 2;
  width: auto;
  height: auto;
  max-width: 92%;
  max-height: 72%;
  margin: auto;
  display: block;
  object-fit: contain;
  user-select: none;
  pointer-events: none;
  filter: drop-shadow(0 4px 12px rgba(43, 57, 145, 0.35));
}

.hero__copy {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  text-align: start;
  gap: 12px;
  max-width: 34rem;
}

.hero__title {
  margin: 0;
  font-size: clamp(30px, 3.8vw, 48px);
  line-height: 1.28;
  font-weight: 900;
}

.hero__title span {
  color: var(--accent);
}

.hero__subtitle {
  margin: 0;
  font-size: clamp(16px, 1.7vw, 19px);
  line-height: 1.7;
  color: var(--text-muted);
  text-align: justify;
}

.hero__actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 6px;
}

/* اسلات ویدیو: نسبت ثابت موبایل گیم (۹:۱۶)، نه باکس کشیده */
.hero__playfield {
  position: relative;
  width: min(28vw, 300px);
  flex: 0 0 auto;
  /* RTL: end = لبهٔ بیرونی ستون چپ، هم‌تراز ریل محتوا */
  justify-self: end;
  margin-inline: 0;
  transform: none;
}

.hero__playfield-frame {
  position: relative;
  width: 100%;
  aspect-ratio: 9 / 16;
  border-radius: 28px;
  overflow: hidden;
  background:
    linear-gradient(180deg, #1a2448 0%, #121830 48%, #0c101c 100%);
  box-shadow:
    0 0 0 1px rgba(43, 57, 145, 0.35),
    0 24px 48px rgba(0, 0, 0, 0.45);
}

.hero__playfield-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(180deg, transparent 62%, rgba(18, 20, 24, 0.35) 100%),
    repeating-linear-gradient(
      180deg,
      transparent 0 28px,
      rgba(255, 255, 255, 0.015) 28px 29px
    );
  z-index: 1;
}

.hero__gameplay {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center top;
  background: #0f141c;
  z-index: 0;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  padding: 0 32px;
  border-radius: var(--radius-md);
  font-weight: 700;
  font-size: 18px;
  text-decoration: none;
  border: none;
  cursor: pointer;
  font-family: inherit;
}

.btn--primary {
  padding-inline: 36px;
  background: var(--accent);
  color: #fff;
  font-weight: 900;
}

.btn--primary:hover {
  background: var(--accent-hover);
  color: #fff;
}

.btn--ghost {
  border: 2px solid var(--border);
  color: var(--text);
  background: transparent;
}

.btn--ghost:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.btn--dark {
  background: var(--primary);
  color: #fff;
  padding-inline: 36px;
}

.btn--dark:hover {
  color: #fff;
  background: var(--primary-hover);
}

/* —— ویدیو —— */
.intro-video {
  padding-block: 80px 96px;
}

.intro-video__frame {
  width: 100%;
  max-width: 100%;
  margin: 0;
  border-radius: var(--radius-lg);
  background: var(--bg-soft);
  overflow: hidden;
}

.intro-video__embed {
  width: 100%;
  line-height: 0;
}

.intro-video__embed iframe {
  display: block;
  width: 100%;
  border: 0;
}

/* —— درباره / جوایز —— */
.about {
  padding-block: 8px 96px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
  text-align: center;
}

.about h2 {
  margin: 0;
  width: 100%;
  max-width: 56rem;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  line-height: 1.3;
  color: #fff;
  text-align: center;
}

.about h2 + p {
  margin: 0;
}

.about h2#prizes {
  margin-top: 36px;
}

.about p {
  margin: 0;
  width: 100%;
  max-width: 56rem;
  font-size: 18px;
  line-height: 2;
  color: var(--text-body);
  text-align: justify;
}

/* —— همراه‌مکانیک —— */
.hamrah {
  background: var(--bg-light);
  color: var(--text-dark);
}

.hamrah__inner {
  /* فقط عمودی — padding افقی از .container می‌آید تا با بقیه هم‌تراز بماند */
  padding-block: 96px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 56px;
}

.hamrah__copy {
  flex: 1 1 480px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.hamrah__copy h2 {
  margin: 0;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 900;
  color: var(--primary);
}

.hamrah__copy p {
  margin: 0;
  font-size: 18px;
  line-height: 2.1;
  color: var(--text-dark-body);
  text-align: justify;
}

.hamrah__copy .btn {
  align-self: flex-start;
  margin-top: 8px;
}

.hamrah__visual {
  flex: 1 1 380px;
  min-width: 0;
  height: auto;
  aspect-ratio: 16 / 9;
  max-height: 420px;
  border-radius: var(--radius-lg);
  background: #0a1630;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.hamrah__visual img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

/* —— فوتر —— */
.site-footer {
  background: var(--bg-footer);
  border-top: 1px solid var(--border-footer);
}

.site-footer__inner {
  padding-block: 48px 36px;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 24px;
}

.site-footer__top {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 40px;
  width: 100%;
}

.site-footer__brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.site-footer__logo {
  display: inline-flex;
  align-items: center;
}

.site-footer__logo img {
  height: 40px;
  width: auto;
  display: block;
  opacity: 0.95;
}

.site-footer__tagline {
  margin: 0;
  max-width: 28rem;
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
  text-align: justify;
}

.site-footer__social {
  display: flex;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
  flex-shrink: 0;
}

.site-footer__social a {
  display: inline-grid;
  place-items: center;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  color: var(--text-body);
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.08);
  text-decoration: none;
  transition: color 0.2s ease, background 0.2s ease, border-color 0.2s ease;
}

.site-footer__social a:hover {
  color: #fff;
  background: rgba(237, 27, 36, 0.18);
  border-color: rgba(237, 27, 36, 0.45);
}

.site-footer__nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 16px;
  width: 100%;
  padding: 18px 0 0;
  border-top: 1px solid var(--border-footer);
  font-size: 15px;
  font-weight: 500;
}

.site-footer__nav a {
  color: var(--text-body);
  text-decoration: none;
  white-space: nowrap;
}

.site-footer__nav a:hover {
  color: var(--accent);
}

.site-footer__bottom {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 12px 24px;
  width: 100%;
  padding-top: 16px;
  border-top: 1px solid var(--border-footer);
}

.site-footer__copy {
  margin: 0;
  font-size: 13px;
  color: var(--text-muted);
  text-align: start;
}

.site-footer__site {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
  text-align: end;
}

.site-footer__site:hover {
  color: var(--accent);
}

@media (max-width: 720px) {
  :root {
    --page-gutter: 20px;
  }

  body.game-landing {
    overflow-x: clip;
  }

  /* —— نروبنر —— */
  .promo-bar__inner {
    flex-direction: row;
    align-items: center;
    gap: 10px;
    min-height: 52px;
    padding-block: 6px;
  }

  .promo-bar__ticker {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 12px;
    font-weight: 800;
    height: 36px;
    line-height: 1.35;
    text-align: start;
  }

  .promo-bar__frame {
    justify-content: flex-start;
    padding-inline-end: 4px;
  }

  .promo-bar__cta {
    flex: 0 0 auto;
    width: auto;
    min-height: 36px;
    font-size: 13px;
    padding: 0 12px;
    white-space: nowrap;
  }

  /* —— هدر —— */
  .site-header {
    padding: 14px 0 10px;
  }

  .site-header__inner {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
  }

  .site-header__brand img {
    height: 30px;
  }

  .site-header__nav {
    width: 100%;
    justify-content: center;
    gap: 8px 14px;
    font-size: 13px;
  }

  .site-header__nav a {
    padding: 6px 2px;
  }

  /* —— هیرو —— */
  .hero {
    padding: 12px 0 40px;
    overflow-x: clip;
    overflow-y: visible;
  }

  .hero__grid {
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 22px;
    min-height: 0;
  }

  .hero__intro {
    width: 100%;
    align-items: center;
    gap: 12px;
  }

  .hero__orb {
    width: min(90vw, 340px);
    margin-inline: 0;
    overflow: hidden;
  }

  .hero__copy {
    width: 100%;
    align-items: center;
    text-align: center;
    max-width: none;
    gap: 10px;
  }

  .hero__title {
    font-size: clamp(24px, 7vw, 32px);
    line-height: 1.35;
  }

  .hero__subtitle {
    font-size: 14px;
    line-height: 1.7;
    max-width: 22rem;
  }

  .hero__actions {
    width: 100%;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
    margin-top: 4px;
  }

  .hero__actions .btn {
    width: 100%;
    min-height: 50px;
    padding-inline: 20px;
    font-size: 15px;
  }

  .hero__playfield {
    width: min(78vw, 300px);
    justify-self: center;
    margin-inline-end: 0;
    transform: none;
  }

  /* —— درباره —— */
  .about {
    padding-block: 8px 56px;
    gap: 14px;
  }

  .intro-video {
    padding-block: 40px 56px;
  }

  .about h2 {
    font-size: clamp(22px, 6.5vw, 28px);
  }

  .about h2#prizes {
    margin-top: 20px;
  }

  .about p {
    font-size: 15px;
    line-height: 1.9;
    text-align: justify;
  }

  /* —— همراه‌مکانیک —— */
  .hamrah__inner {
    flex-direction: column;
    align-items: stretch;
    padding-block: 48px;
    gap: 24px;
  }

  .hamrah__copy {
    flex: 1 1 auto;
    width: 100%;
    align-items: stretch;
    text-align: start;
    gap: 14px;
  }

  .hamrah__copy h2 {
    font-size: clamp(22px, 6.5vw, 28px);
    text-align: center;
  }

  .hamrah__copy p {
    font-size: 15px;
    line-height: 1.9;
    text-align: justify;
  }

  .hamrah__copy .btn {
    align-self: stretch;
    width: 100%;
    margin-top: 4px;
  }

  .hamrah__visual {
    flex: 1 1 auto;
    width: 100%;
    height: auto;
    max-height: none;
    aspect-ratio: 16 / 9;
  }

  /* —— فوتر —— */
  .site-footer__inner {
    padding: 36px 0 28px;
    gap: 20px;
  }

  .site-footer__top {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 16px;
  }

  .site-footer__brand {
    align-items: center;
  }

  .site-footer__logo img {
    height: 34px;
  }

  .site-footer__tagline {
    text-align: center;
    font-size: 13px;
  }

  .site-footer__social {
    justify-content: center;
    flex-wrap: wrap;
    gap: 10px;
  }

  .site-footer__social a {
    width: 44px;
    height: 44px;
  }

  .site-footer__nav {
    justify-content: center;
    gap: 10px 18px;
    padding-top: 16px;
    font-size: 14px;
  }

  .site-footer__nav a {
    padding: 6px 0;
  }

  .site-footer__bottom {
    flex-direction: column;
    justify-content: center;
    text-align: center;
    gap: 8px;
  }

  .site-footer__copy,
  .site-footer__site {
    text-align: center;
  }
}

@media (max-width: 420px) {
  :root {
    --page-gutter: 16px;
  }

  .hero__playfield {
    width: min(84vw, 280px);
  }

  .site-header__nav {
    gap: 6px 12px;
    font-size: 12px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .promo-bar__frame {
    animation: none;
  }

  .promo-bar__frame--1 {
    opacity: 1;
  }
}
