@import url('https://fonts.googleapis.com/css2?family=Cairo:wght@300;400;500;600;700;800;900&family=Space+Grotesk:wght@400;500;600;700;800&display=swap');

/* ── Tokens ─────────────────────────────────────────────────────────────────── */
:root {
  --black:    #000000;
  --surface:  #080808;
  --border:   #191919;
  --green:    #32CD32;
  --white:    #ffffff;
  --grey:     rgba(255,255,255,0.42);
  --grey-dim: rgba(255,255,255,0.12);

  --font-ar: 'Cairo', sans-serif;
  --font-en: 'Space Grotesk', sans-serif;

  --nav-h: 66px;
  --ease:  cubic-bezier(0.4,0,0.2,1);
}

/* ── Reset ──────────────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { direction: rtl; scroll-behavior: smooth; }

::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: #000; }
::-webkit-scrollbar-thumb { background: #32CD32; border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: #28b828; }
* { scrollbar-width: thin; scrollbar-color: #32CD32 #000; }

body {
  font-family: var(--font-ar);
  background: var(--black);
  color: var(--white);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
img { display: block; max-width: 100%; }
ul { list-style: none; }

/* ── Scroll reveal ──────────────────────────────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.6s var(--ease), transform 0.6s var(--ease);
}
.reveal.visible           { opacity: 1; transform: translateY(0); }
.reveal-delay-1           { transition-delay: 0.08s; }
.reveal-delay-2           { transition-delay: 0.16s; }
.reveal-delay-3           { transition-delay: 0.24s; }
.reveal-delay-4           { transition-delay: 0.32s; }

/* ── Utilities ──────────────────────────────────────────────────────────────── */
.container {
  width: 100%;
  max-width: 1080px;
  margin-inline: auto;
  padding-inline: 28px;
}

.accent { color: var(--green); }

.section-label {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--green);
  margin-bottom: 18px;
}

.section-label::before {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--green);
}

.divider { width: 100%; height: 1px; background: var(--border); }

/* ── Nav ────────────────────────────────────────────────────────────────────── */
nav {
  position: fixed;
  inset-block-start: 0;
  inset-inline: 0;
  z-index: 100;
  height: var(--nav-h);
  background: rgba(0,0,0,0.9);
  border-block-end: 1px solid var(--border);
  backdrop-filter: blur(14px);
}

.nav-inner {
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.nav-logo {
  width: 36px;
  height: 36px;
  object-fit: cover;
  border-radius: 5px;
  border: 1px solid var(--border);
}

.nav-name {
  font-family: var(--font-en);
  font-weight: 800;
  font-size: 16px;
  color: var(--white);
  letter-spacing: 0.04em;
}

.nav-name span { color: var(--green); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 36px;
}

.nav-links a {
  font-size: 13px;
  font-weight: 500;
  color: var(--grey);
  position: relative;
  padding-bottom: 2px;
  transition: color 0.18s;
}

.nav-links a::after {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-end: -1px;
  width: 0;
  height: 1px;
  background: var(--white);
  transition: width 0.25s var(--ease);
}

.nav-links a:hover      { color: var(--white); }
.nav-links a:hover::after { width: 100%; }
.nav-links a.active     { color: var(--green); }
.nav-links a.active::after { background: var(--green); width: 100%; }

.nav-cta {
  color: var(--green) !important;
  font-weight: 700 !important;
}

.nav-cta:hover { opacity: 0.7; }
.nav-cta::after { background: var(--green) !important; }

.nav-toggle {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  padding: 4px;
}

.nav-toggle span { display: block; width: 20px; height: 1.5px; background: var(--white); transition: all 0.2s; }

/* ── Hero ───────────────────────────────────────────────────────────────────── */
#hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding-block-start: var(--nav-h);
  padding-block-end: 60px;
  border-block-end: 1px solid var(--border);
  overflow: hidden;
}

/* Giant "XG" background watermark */
#hero::before {
  content: 'XG';
  position: absolute;
  inset-inline-end: -2%;
  top: 50%;
  transform: translateY(-48%);
  font-family: var(--font-en);
  font-size: clamp(280px, 38vw, 560px);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.055);
  pointer-events: none;
  user-select: none;
  letter-spacing: -0.05em;
  z-index: 0;
}

/* Thin green horizontal rule in the hero */
.hero-rule {
  width: 100%;
  height: 1px;
  background: var(--border);
  position: relative;
  margin-block-end: 40px;
}

.hero-rule::before {
  content: '';
  position: absolute;
  inset-block-start: 0;
  inset-inline-start: 0;
  height: 1px;
  width: 120px;
  background: var(--green);
  animation: rule-grow 1.2s 0.3s var(--ease) both;
}

@keyframes rule-grow {
  from { width: 0; }
  to   { width: 120px; }
}

.hero-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 40px;
  align-items: flex-start;
}

.hero-eyebrow {
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--grey);
  margin-bottom: 22px;
  animation: fade-up 0.5s 0.2s var(--ease) both;
}

.hero-eyebrow::before {
  content: '';
  width: 28px;
  height: 1px;
  background: var(--green);
  flex-shrink: 0;
}

.hero-eyebrow-dot {
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse-dot 2.5s ease-in-out infinite;
}

@keyframes pulse-dot {
  0%, 100% { opacity: 1; }
  50%       { opacity: 0.3; }
}

.hero-title {
  font-size: clamp(52px, 8vw, 110px);
  font-weight: 900;
  line-height: 1.25;
  letter-spacing: -0.02em;
  margin-bottom: 52px;
}

.hero-title .word {
  display: inline-block;
  opacity: 0;
  animation: word-in 0.55s var(--ease) forwards;
}

.hero-title .word:nth-child(1) { animation-delay: 0.3s; }
.hero-title .word:nth-child(2) { animation-delay: 0.44s; }
.hero-title .word:nth-child(3) { animation-delay: 0.58s; }

@keyframes word-in {
  from { opacity: 0; transform: translateY(20px); }
  to   { opacity: 1; transform: translateY(0); }
}

.hero-desc {
  font-size: 15px;
  color: var(--grey);
  line-height: 1.85;
  max-width: 440px;
  animation: fade-up 0.55s 0.72s var(--ease) both;
}

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

.hero-actions {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-top: 36px;
  animation: fade-up 0.55s 0.82s var(--ease) both;
}

.hero-meta {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  /* position logo vertically centered against the 3 title words */
  padding-top: 40px;
  animation: fade-up 0.5s 0.5s var(--ease) both;
}

.hero-meta-logo {
  width: 320px;
  height: 320px;
  border-radius: 28px;
  object-fit: cover;
  border: 1px solid var(--border);
  filter: grayscale(30%);
  transition: filter 0.3s, transform 0.3s var(--ease);
}

.hero-meta-logo:hover {
  filter: grayscale(0%);
  transform: translateY(-4px);
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn-primary {
  display: inline-block;
  background: var(--green);
  color: var(--black);
  font-family: var(--font-ar);
  font-size: 14px;
  font-weight: 700;
  padding: 12px 28px;
  border-radius: 3px;
  border: none;
  transition: opacity 0.18s, transform 0.15s;
}

.btn-primary:hover  { opacity: 0.85; transform: translateY(-2px); }
.btn-primary:active { opacity: 1;    transform: translateY(0); }

.btn-ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--grey);
  font-size: 13px;
  font-weight: 500;
  padding: 12px 0;
  border-bottom: 1px solid var(--grey-dim);
  transition: color 0.18s, border-color 0.18s;
}

.btn-ghost:hover { color: var(--white); border-color: rgba(255,255,255,0.35); }

/* ── Marquee ────────────────────────────────────────────────────────────────── */
.marquee-strip {
  background: var(--green);
  overflow: hidden;
  padding-block: 12px;
  border-block: 1px solid rgba(50,205,50,0.2);
}

.marquee-track {
  display: flex;
  gap: 0;
  width: max-content;
  animation: marquee 22s linear infinite;
}

.marquee-track:hover { animation-play-state: paused; }

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

.marquee-item {
  display: flex;
  align-items: center;
  gap: 18px;
  padding-inline: 28px;
  font-family: var(--font-en);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--black);
  white-space: nowrap;
}

.marquee-sep {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: rgba(0,0,0,0.3);
  flex-shrink: 0;
}

/* ── Stats ──────────────────────────────────────────────────────────────────── */
#stats {
  padding-block: 72px;
  border-block-end: 1px solid var(--border);
}

.stats-inner {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
}

.stat-item {
  padding: 0 40px;
  border-inline-end: 1px solid var(--border);
}

.stat-item:first-child { padding-inline-start: 0; }
.stat-item:last-child  { border-inline-end: none; }

.stat-num {
  font-family: var(--font-en);
  font-size: clamp(52px, 7vw, 80px);
  font-weight: 800;
  color: var(--white);
  line-height: 1;
  margin-bottom: 8px;
  letter-spacing: -0.03em;
}

.stat-label-text {
  font-size: 13px;
  color: var(--grey);
  font-weight: 400;
  border-inline-start: 2px solid var(--green);
  padding-inline-start: 10px;
  line-height: 1.4;
}

/* ── About ──────────────────────────────────────────────────────────────────── */
#about {
  padding-block: 110px;
  border-block-end: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

/* background watermark */
#about::before {
  content: 'ABOUT';
  position: absolute;
  inset-inline-start: -1%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.035);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.about-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}

.about-heading {
  font-size: clamp(30px, 4vw, 48px);
  font-weight: 800;
  line-height: 1.55;
  margin-bottom: 24px;
  letter-spacing: -0.01em;
}

.about-body {
  font-size: 14px;
  color: var(--grey);
  line-height: 2;
  margin-bottom: 16px;
}

.about-values { display: flex; flex-direction: column; }

.value-item {
  display: flex;
  align-items: flex-start;
  gap: 20px;
  padding: 20px 0;
  border-block-end: 1px solid var(--border);
  transition: padding-inline-start 0.22s var(--ease);
}

.value-item:hover { padding-inline-start: 10px; }
.value-item:first-child { border-block-start: 1px solid var(--border); }

.value-num {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  padding-top: 3px;
  flex-shrink: 0;
  letter-spacing: 0.06em;
}

.value-text h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.value-text p  { font-size: 12px; color: var(--grey); line-height: 1.7; }

/* ── Games ──────────────────────────────────────────────────────────────────── */
#games {
  padding-block: 110px;
  border-block-end: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

#games::before {
  content: 'GAMES';
  position: absolute;
  inset-inline-end: -2%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: clamp(100px, 18vw, 220px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.035);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.section-header {
  margin-bottom: 56px;
  position: relative;
  z-index: 1;
}

.section-title {
  font-size: clamp(28px, 4vw, 46px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -0.01em;
}

/* Redesigned editorial game rows */
.games-list { position: relative; z-index: 1; }

.game-row {
  display: grid;
  grid-template-columns: 64px 1px 1fr auto;
  gap: 0 32px;
  align-items: center;
  padding: 32px 0;
  border-block-end: 1px solid var(--border);
  transition: background 0.2s var(--ease);
  position: relative;
}

.game-row:first-child { border-block-start: 1px solid var(--border); }

.game-row::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block: 0;
  width: 0;
  background: var(--surface);
  transition: width 0.35s var(--ease);
  z-index: -1;
}

.game-row:hover::before { width: 100%; }

.game-row-num {
  font-family: var(--font-en);
  font-size: 11px;
  font-weight: 700;
  color: var(--green);
  letter-spacing: 0.08em;
  text-align: center;
}

.game-row-line {
  width: 1px;
  height: 100%;
  background: var(--border);
  align-self: stretch;
}

.game-row-main { display: flex; flex-direction: column; gap: 6px; }

.game-row-emoji {
  font-size: 22px;
  margin-bottom: 2px;
}

.game-row-name {
  font-size: clamp(20px, 3vw, 30px);
  font-weight: 800;
  color: var(--white);
  letter-spacing: -0.01em;
  line-height: 1;
}

.game-row-desc {
  font-size: 13px;
  color: var(--grey);
  line-height: 1.6;
  max-width: 420px;
}

.game-row-tag {
  font-family: var(--font-en);
  font-size: 10px;
  font-weight: 700;
  color: var(--green);
  border: 1px solid rgba(50,205,50,0.3);
  padding: 4px 12px;
  border-radius: 2px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  white-space: nowrap;
  transition: background 0.2s, color 0.2s;
}

.game-row:hover .game-row-tag {
  background: var(--green);
  color: var(--black);
}

/* ── Requirements ───────────────────────────────────────────────────────────── */
#requirements {
  padding-block: 110px;
  border-block-end: 1px solid var(--border);
}

.req-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  border: 1px solid var(--border);
  margin-top: 48px;
}

.req-item {
  padding: 28px 24px;
  display: flex;
  gap: 16px;
  align-items: flex-start;
  border-block-end: 1px solid var(--border);
  border-inline-end: 1px solid var(--border);
  transition: background 0.18s;
}

.req-item:hover { background: var(--surface); }
.req-item:nth-child(even) { border-inline-end: none; }
.req-item:nth-last-child(-n+2) { border-block-end: none; }

.req-icon { color: var(--green); font-size: 16px; flex-shrink: 0; padding-top: 2px; }

.req-text h4 { font-size: 14px; font-weight: 700; color: var(--white); margin-bottom: 4px; }
.req-text p  { font-size: 12px; color: var(--grey); line-height: 1.6; }

/* ── Join CTA ───────────────────────────────────────────────────────────────── */
#join {
  padding-block: 110px;
  border-block-end: 1px solid var(--border);
  position: relative;
  overflow: hidden;
}

#join::before {
  content: 'JOIN';
  position: absolute;
  inset-inline-start: -1%;
  top: 50%;
  transform: translateY(-50%);
  font-family: var(--font-en);
  font-size: clamp(120px, 22vw, 260px);
  font-weight: 900;
  color: transparent;
  -webkit-text-stroke: 1px rgba(255,255,255,0.03);
  pointer-events: none;
  user-select: none;
  line-height: 1;
  z-index: 0;
}

.join-inner {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 60px;
  align-items: center;
}

.join-heading {
  font-size: clamp(32px, 5vw, 58px);
  font-weight: 900;
  line-height: 1.55;
  margin-bottom: 16px;
  letter-spacing: -0.02em;
}

.join-sub { font-size: 14px; color: var(--grey); line-height: 1.85; }

/* ── Footer ─────────────────────────────────────────────────────────────────── */
footer { padding-block: 40px; }

.footer-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand { display: flex; align-items: center; gap: 10px; }

.footer-logo {
  width: 26px;
  height: 26px;
  border-radius: 4px;
  object-fit: cover;
  border: 1px solid var(--border);
}

.footer-name {
  font-family: var(--font-en);
  font-size: 13px;
  font-weight: 700;
  color: var(--white);
  letter-spacing: 0.05em;
}

.footer-name span { color: var(--green); }

.footer-copy { font-size: 12px; color: rgba(255,255,255,0.2); }

/* ── Mobile ─────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  body {
    cursor: auto;
    overflow-x: hidden;
    width: 100%;
  }

  /* Hide unnecessary decorative background objects on phone */
  #hero::before,
  #about::before,
  #games::before,
  #join::before,
  .hero-rule,
  .marquee-strip {
    display: none !important;
  }

  /* Force scroll reveals to be visible on phone */
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }

  .container {
    padding-inline: 18px;
    width: 100%;
  }

  /* Nav */
  nav {
    height: 60px;
    background: rgba(0,0,0,0.95);
  }

  .nav-inner {
    height: 100%;
  }

  .nav-links {
    display: none;
    position: fixed;
    top: 60px;
    inset-inline: 0;
    background: #080808;
    border-bottom: 1px solid var(--border);
    padding: 24px 20px;
    flex-direction: column;
    align-items: stretch;
    gap: 16px;
    z-index: 999;
    box-shadow: 0 20px 40px rgba(0,0,0,0.9);
  }

  .nav-links.open {
    display: flex;
  }

  .nav-toggle {
    display: flex;
    cursor: pointer;
  }

  .nav-links a {
    font-size: 16px;
    padding: 10px 0;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }

  .nav-links a:last-child {
    border-bottom: none;
  }

  /* Hero */
  #hero {
    min-height: auto;
    padding-block-start: 84px;
    padding-block-end: 40px;
  }

  .hero-inner {
    display: flex;
    flex-direction: column-reverse;
    gap: 20px;
    align-items: flex-start;
  }

  .hero-meta {
    padding-top: 0;
    margin-bottom: 4px;
  }

  .hero-meta-logo {
    width: 140px;
    height: 140px;
    border-radius: 18px;
    box-shadow: 0 0 30px rgba(50,205,50,0.15);
  }

  .hero-title {
    font-size: 34px;
    line-height: 1.35;
    margin-bottom: 18px;
  }

  .hero-desc {
    font-size: 14px;
    line-height: 1.8;
    margin-bottom: 24px;
    color: rgba(255,255,255,0.65);
  }

  .hero-actions {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost {
    width: 100%;
    justify-content: center;
    padding: 14px;
    font-size: 15px;
    text-align: center;
  }

  /* Sections */
  #about, #games, #requirements, #join {
    padding-block: 50px;
  }

  /* Stats */
  .stats-inner {
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
  }

  .stat-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #0b0b0b;
  }

  .stat-num {
    font-size: 32px;
  }

  .stat-label {
    font-size: 12px;
  }

  /* About */
  .about-inner {
    grid-template-columns: 1fr;
    gap: 24px;
  }

  .about-title {
    font-size: 26px;
    line-height: 1.4;
  }

  .about-body p {
    font-size: 14px;
    line-height: 1.8;
  }

  /* Games */
  .game-row {
    grid-template-columns: 36px 1px 1fr;
    gap: 14px;
    padding-block: 16px;
  }

  .game-row-tag {
    display: none;
  }

  .game-row-title {
    font-size: 18px;
  }

  .game-row-desc {
    font-size: 13px;
  }

  /* Requirements */
  .req-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .req-item {
    border: 1px solid var(--border);
    border-radius: 8px;
    padding: 16px;
    background: #0b0b0b;
  }

  /* Join CTA */
  .join-inner {
    grid-template-columns: 1fr;
    gap: 20px;
    text-align: center;
  }

  .join-heading {
    font-size: 28px;
    line-height: 1.4;
  }

  .join-inner .btn-primary {
    width: 100%;
    justify-content: center;
    padding: 14px 20px !important;
  }

  /* Footer */
  .footer-inner {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 10px;
  }
}

