/* ===== FAKKAR — LANDING PAGE ===== */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --gold:    #F5A623;
  --gold-d:  #E8940F;
  --gold-l:  #FDD87A;
  --indigo:  #4F46E5;
  --bg:      #FAFAF7;
  --surface: #FFFFFF;
  --border:  #E8E8E2;
  --text:    #1C1C1E;
  --text2:   #5A5A5A;
  --text3:   #8A8A8A;
  --nav-bg:  rgba(250, 250, 247, 0.85);
  --shadow:  0 20px 60px rgba(0, 0, 0, 0.06);
  --f-head:  'Orbitron', monospace;
  --f-body:  'Inter', sans-serif;
}

:root[data-theme="dark"] {
  --bg:      #0F0F0F;
  --surface: #1A1A1A;
  --border:  #2E2E2E;
  --text:    #F5F5F0;
  --text2:   #B0B0A8;
  --text3:   #7A7A74;
  --nav-bg:  rgba(15, 15, 15, 0.85);
  --shadow:  0 20px 60px rgba(0, 0, 0, 0.5);
}

html { scroll-behavior: smooth; }

body {
  font-family: var(--f-body);
  background: var(--bg);
  color: var(--text);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  transition: background 0.3s ease, color 0.3s ease;
}

/* ===== BACKGROUND ===== */
.bg-blobs {
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  overflow: hidden;
}
.bg-blobs::before,
.bg-blobs::after {
  content: '';
  position: absolute;
  border-radius: 50%;
}
.bg-blobs::before {
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(245,166,35,0.10) 0%, transparent 70%);
  top: -200px; right: -200px;
  animation: blobFloat 14s ease-in-out infinite;
}
.bg-blobs::after {
  width: 600px; height: 600px;
  background: radial-gradient(circle, rgba(79,70,229,0.07) 0%, transparent 70%);
  bottom: -150px; left: -150px;
  animation: blobFloat 18s ease-in-out infinite reverse;
}

/* ===== NAV ===== */
nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.2rem 4rem;
  background: var(--nav-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
}

.nav-logo {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  text-decoration: none;
}
.nav-logo-icon {
  width: 40px; height: 40px;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.3rem;
  box-shadow: 0 4px 12px rgba(245,166,35,0.3);
}
.nav-logo-text {
  font-family: var(--f-head);
  font-size: 1.4rem;
  font-weight: 900;
  color: var(--text);
}
.nav-logo-text span { color: var(--gold); }

.nav-actions { display: flex; align-items: center; gap: 0.75rem; }

.theme-toggle {
  width: 42px; height: 42px;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.1rem;
  transition: transform 0.25s ease;
}
.theme-toggle:hover { transform: scale(1.08); }

.nav-play {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 1.6rem;
  background: var(--gold);
  color: white;
  font-family: var(--f-head);
  font-size: 0.85rem;
  font-weight: 700;
  border-radius: 999px;
  text-decoration: none;
  white-space: nowrap;
  transition: all 0.25s ease;
  box-shadow: 0 4px 14px rgba(245,166,35,0.35);
}
.nav-play:hover {
  background: var(--gold-d);
  transform: translateY(-2px);
  box-shadow: 0 8px 22px rgba(245,166,35,0.4);
}

/* ===== HERO ===== */
.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 8rem 2rem 6rem;
}

.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1.1rem;
  background: rgba(245,166,35,0.1);
  border: 1px solid rgba(245,166,35,0.3);
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--gold-d);
  margin-bottom: 2.5rem;
  animation: fadeUp 0.6s ease both;
}

.hero-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 1.2rem;
  margin-bottom: 1.5rem;
  animation: fadeUp 0.7s ease 0.1s both;
}
.hero-logo-icon {
  width: 80px; height: 80px;
  flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  border-radius: 22px;
  display: flex; align-items: center; justify-content: center;
  font-size: 2.8rem;
  box-shadow: 0 8px 30px rgba(245,166,35,0.4);
  animation: bulbFloat 4s ease-in-out infinite;
}

.hero-title {
  font-family: var(--f-head);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 900;
  color: var(--text);
  line-height: 1;
  letter-spacing: -2px;
}
.hero-title span { color: var(--gold); }

.hero-tagline {
  font-size: clamp(1.05rem, 2.5vw, 1.4rem);
  color: var(--text2);
  margin: 1.5rem 0 3rem;
  max-width: 480px;
  line-height: 1.6;
  animation: fadeUp 0.7s ease 0.3s both;
}

.hero-cta {
  display: flex;
  align-items: center;
  gap: 1rem;
  flex-wrap: wrap;
  justify-content: center;
  animation: fadeUp 0.7s ease 0.4s both;
}

.btn-primary {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.1rem 2.8rem;
  background: var(--gold);
  color: white;
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 700;
  border-radius: 16px;
  text-decoration: none;
  transition: all 0.25s ease;
  box-shadow: 0 6px 24px rgba(245,166,35,0.4);
  letter-spacing: 0.3px;
}
.btn-primary:hover {
  background: var(--gold-d);
  transform: translateY(-4px);
  box-shadow: 0 12px 32px rgba(245,166,35,0.5);
}

.btn-secondary {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 1.1rem 2rem;
  background: var(--surface);
  color: var(--text2);
  font-size: 0.95rem;
  font-weight: 600;
  border-radius: 16px;
  text-decoration: none;
  border: 1.5px solid var(--border);
  transition: all 0.25s ease;
}
.btn-secondary:hover {
  border-color: var(--gold);
  color: var(--gold-d);
  transform: translateY(-2px);
}

.hero-stats {
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 2.5rem;
  margin-top: 4rem;
  animation: fadeUp 0.7s ease 0.5s both;
}
.hero-stat { text-align: center; }
.hero-stat-num {
  display: block;
  font-family: var(--f-head);
  font-size: 1.8rem;
  font-weight: 900;
  color: var(--gold-d);
}
.hero-stat-label {
  font-size: 0.78rem;
  color: var(--text3);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.8px;
}
.stat-divider {
  width: 1px;
  height: 40px;
  background: var(--border);
}

/* ===== SECTION SHARED ===== */
section {
  padding: 6rem 2rem;
  max-width: 1100px;
  margin: 0 auto;
}

.section-label {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.5px;
  color: var(--gold-d);
  margin-bottom: 1rem;
}
.section-title {
  font-family: var(--f-head);
  font-size: clamp(1.8rem, 4vw, 2.8rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.15;
}
.section-title span { color: var(--gold); }
.section-sub {
  font-size: 1.05rem;
  color: var(--text2);
  max-width: 520px;
  line-height: 1.65;
}

/* ===== HOW TO PLAY ===== */
.how-section { text-align: center; }
.how-section .section-sub { margin: 0 auto 4rem; }

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  position: relative;
}
.steps::before {
  content: '';
  position: absolute;
  top: 52px;
  left: calc(16.6% + 1rem);
  right: calc(16.6% + 1rem);
  height: 2px;
  background: linear-gradient(90deg, var(--gold), var(--indigo));
  opacity: 0.3;
}

.step,
.feature {
  background: var(--surface);
  border: 1.5px solid var(--border);
  transition: all 0.3s ease;
}
.step {
  border-radius: 24px;
  padding: 2.5rem 2rem;
  position: relative;
}
.step:hover {
  border-color: var(--gold);
  transform: translateY(-6px);
  box-shadow: 0 12px 36px rgba(245,166,35,0.12);
}

.step-number {
  width: 56px; height: 56px;
  background: linear-gradient(135deg, var(--gold-l), var(--gold));
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--f-head);
  font-size: 1.2rem;
  font-weight: 900;
  color: white;
  margin: 0 auto 1.5rem;
  box-shadow: 0 4px 14px rgba(245,166,35,0.35);
}
.step h3 {
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.75rem;
}
.step p {
  font-size: 0.9rem;
  color: var(--text2);
  line-height: 1.6;
}

/* ===== FEATURES ===== */
.features-section {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 5rem;
  align-items: center;
}
.features-intro .btn-primary { margin-top: 2.5rem; }

.features-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.feature {
  border-radius: 20px;
  padding: 1.8rem 1.5rem;
}
.feature:hover {
  border-color: var(--gold);
  transform: translateY(-4px);
  box-shadow: 0 8px 24px rgba(245,166,35,0.1);
}
.feature-icon {
  width: 48px; height: 48px;
  background: linear-gradient(135deg, rgba(245,166,35,0.15), rgba(245,166,35,0.08));
  border: 1.5px solid rgba(245,166,35,0.2);
  border-radius: 14px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.5rem;
  margin-bottom: 1.2rem;
}
.feature h4 {
  font-family: var(--f-head);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 0.5rem;
}
.feature p {
  font-size: 0.82rem;
  color: var(--text2);
  line-height: 1.55;
}

/* ===== CTA ===== */
.cta-section {
  text-align: center;
  padding: 5rem 2rem 8rem;
  max-width: 700px;
}
.cta-card {
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: 32px;
  padding: 5rem 3rem;
  position: relative;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.cta-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--gold), var(--indigo), var(--gold));
  background-size: 200% 100%;
  animation: shimmer 3s ease infinite;
}
.cta-bulb {
  font-size: 4rem;
  margin-bottom: 1.5rem;
  display: block;
  animation: bulbFloat 3s ease-in-out infinite;
}
.cta-card h2 {
  font-family: var(--f-head);
  font-size: clamp(1.6rem, 4vw, 2.4rem);
  font-weight: 900;
  color: var(--text);
  margin-bottom: 1rem;
  line-height: 1.2;
}
.cta-card h2 span { color: var(--gold); }
.cta-card p {
  font-size: 1rem;
  color: var(--text2);
  margin-bottom: 2.5rem;
  line-height: 1.6;
}

/* ===== FOOTER ===== */
footer {
  border-top: 1px solid var(--border);
  padding: 2rem 4rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-logo {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-family: var(--f-head);
  font-size: 1rem;
  font-weight: 900;
  color: var(--text);
  text-decoration: none;
}
.footer-logo span { color: var(--gold); }
footer p {
  font-size: 0.82rem;
  color: var(--text3);
}
footer p a { color: var(--text3); }
footer p a:hover { color: var(--gold-d); }

/* ===== ANIMATIONS ===== */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes bulbFloat {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-10px); }
}
@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50%      { transform: translate(30px, -40px) scale(1.05); }
}
@keyframes shimmer {
  0%   { background-position: 0% 0%; }
  100% { background-position: 200% 0%; }
}

/* Scroll reveal only hides content once JS has confirmed it can reveal it again */
.reveal-ready .reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.reveal-ready .reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ===== RESPONSIVE ===== */
@media (max-width: 900px) {
  nav { padding: 1rem 1.5rem; }
  .steps { grid-template-columns: 1fr; }
  .steps::before { display: none; }
  .features-section { grid-template-columns: 1fr; gap: 3rem; }
  .hero-stats { gap: 1.5rem; }
  footer { flex-direction: column; gap: 0.5rem; text-align: center; padding: 1.5rem; }
}
@media (max-width: 600px) {
  nav { padding: 0.8rem 1rem; }
  .nav-play { padding: 0.6rem 1.1rem; }
  .features-grid { grid-template-columns: 1fr; }
  .hero { padding: 7rem 1rem 4rem; }
  .hero-logo { gap: 0.8rem; }
  .hero-logo-icon { width: 60px; height: 60px; font-size: 2rem; border-radius: 16px; }
  .hero-title { letter-spacing: -1px; }
  .hero-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem 2.5rem;
  }
  .stat-divider { display: none; }
  section { padding: 4rem 1rem; }
  .cta-card { padding: 3rem 1.5rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}

/* ===== ARABIC (right-to-left) ===== */
:root[lang="ar"] {
  --f-head: 'Cairo', 'Orbitron', sans-serif;
  --f-body: 'Cairo', 'Inter', sans-serif;
}
:root[lang="ar"] body * { letter-spacing: 0 !important; }
:root[lang="ar"] .hero-title { line-height: 1.3; }

/* Language switch (landing, legal and 404 pages) */
.lang-switch {
  height: 42px; padding: 0 1rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: 'Cairo', 'Inter', sans-serif; font-weight: 700; font-size: 0.9rem;
  cursor: pointer;
  transition: transform 0.25s ease, border-color 0.25s ease;
}
.lang-switch:hover { border-color: var(--gold); transform: scale(1.04); }
