/* =========================================================
   Polymarket Arabic — Stylesheet
   ========================================================= */

:root {
  --bg-primary: #07090f;
  --bg-secondary: #0d111c;
  --bg-elevated: #131825;
  --bg-card: #161b2a;
  --border-soft: rgba(255, 255, 255, 0.06);
  --border-medium: rgba(255, 255, 255, 0.1);
  --border-strong: rgba(255, 255, 255, 0.18);

  --text-primary: #f5f7fa;
  --text-secondary: #b6bdcc;
  --text-muted: #7d869c;

  --brand: #2962ff;
  --brand-light: #4a9eff;
  --brand-deep: #1a3fb3;
  --brand-glow: rgba(41, 98, 255, 0.35);

  --yes: #1ec373;
  --yes-soft: rgba(30, 195, 115, 0.12);
  --no: #ff4d6d;
  --no-soft: rgba(255, 77, 109, 0.12);

  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-xl: 24px;

  --shadow-soft: 0 4px 18px rgba(0, 0, 0, 0.25);
  --shadow-strong: 0 18px 48px rgba(0, 0, 0, 0.45);

  --container-max: 1200px;

  --font-display: 'Cairo', 'Tajawal', 'Segoe UI', sans-serif;
  --font-body: 'Tajawal', 'IBM Plex Sans Arabic', 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.75;
  font-size: 16px;
  font-weight: 400;
  min-height: 100vh;
  overflow-x: hidden;
  background-image:
    radial-gradient(circle at 85% -10%, rgba(41, 98, 255, 0.18), transparent 45%),
    radial-gradient(circle at 10% 110%, rgba(74, 158, 255, 0.08), transparent 50%);
}

a { color: inherit; text-decoration: none; }
img, svg { max-width: 100%; display: block; }
button { font-family: inherit; cursor: pointer; }
ul { list-style: none; }

h1, h2, h3, h4, h5 {
  font-family: var(--font-display);
  font-weight: 700;
  line-height: 1.3;
  color: var(--text-primary);
}

p { color: var(--text-secondary); }

.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: 24px;
}

/* =========================================================
   Header
   ========================================================= */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(7, 9, 15, 0.78);
  backdrop-filter: saturate(160%) blur(14px);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid var(--border-soft);
}

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  color: var(--text-primary);
  letter-spacing: -0.01em;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  display: grid;
  place-items: center;
  box-shadow: 0 6px 18px var(--brand-glow);
}

.brand-mark svg { width: 22px; height: 22px; }

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

.nav-links a {
  padding: 9px 14px;
  border-radius: var(--radius-sm);
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color .2s ease, background-color .2s ease;
}

.nav-links a:hover { color: var(--text-primary); background: var(--border-soft); }
.nav-links a.active { color: var(--text-primary); background: var(--bg-elevated); }

.nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 11px 22px;
  border-radius: 999px;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  font-weight: 700;
  font-size: 0.95rem;
  border: none;
  box-shadow: 0 8px 24px var(--brand-glow);
  transition: transform .2s ease, box-shadow .2s ease;
}

.nav-cta:hover { transform: translateY(-1px); box-shadow: 0 12px 30px var(--brand-glow); }
.nav-cta::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 0 10px #fff;
}

/* Mobile menu toggle */
.menu-toggle {
  display: none;
  width: 42px;
  height: 42px;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  border: 1px solid var(--border-medium);
  align-items: center;
  justify-content: center;
}

.menu-toggle span {
  position: relative;
  display: block;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
}
.menu-toggle span::before,
.menu-toggle span::after {
  content: '';
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  background: var(--text-primary);
}
.menu-toggle span::before { top: -6px; }
.menu-toggle span::after { top: 6px; }

/* =========================================================
   Hero
   ========================================================= */

.hero {
  position: relative;
  padding: 96px 0 80px;
  overflow: hidden;
}

.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 50% 40% at 70% 30%, rgba(41, 98, 255, 0.18), transparent 70%);
  pointer-events: none;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 64px;
  align-items: center;
  position: relative;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 7px 14px;
  border-radius: 999px;
  background: rgba(41, 98, 255, 0.12);
  border: 1px solid rgba(41, 98, 255, 0.3);
  color: var(--brand-light);
  font-weight: 600;
  font-size: 0.85rem;
  margin-bottom: 24px;
}

.hero-eyebrow .dot {
  width: 7px; height: 7px; border-radius: 50%;
  background: var(--brand-light);
  box-shadow: 0 0 10px var(--brand-light);
}

.hero h1 {
  font-size: clamp(2.2rem, 4.6vw, 3.6rem);
  letter-spacing: -0.02em;
  margin-bottom: 22px;
  line-height: 1.2;
}

.hero h1 .accent {
  background: linear-gradient(120deg, var(--brand-light) 0%, #87b9ff 50%, var(--brand) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.hero p.lead {
  font-size: 1.15rem;
  color: var(--text-secondary);
  margin-bottom: 36px;
  max-width: 540px;
}

.hero-actions { display: flex; gap: 14px; flex-wrap: wrap; }

.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  transition: transform .2s ease, box-shadow .2s ease, background .2s ease;
}

.btn-primary {
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  box-shadow: 0 10px 28px var(--brand-glow);
}

.btn-primary:hover { transform: translateY(-2px); box-shadow: 0 14px 36px var(--brand-glow); }

.btn-secondary {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border: 1px solid var(--border-medium);
}

.btn-secondary:hover { background: var(--bg-card); border-color: var(--border-strong); }

.btn-arrow { transition: transform .2s ease; }
[dir="rtl"] .btn-arrow { transform: scaleX(-1); }
.btn:hover .btn-arrow { transform: translateX(3px); }
[dir="rtl"] .btn:hover .btn-arrow { transform: scaleX(-1) translateX(3px); }

/* Hero visual — sample market card */
.hero-visual {
  position: relative;
  display: grid;
  gap: 18px;
}

.market-card {
  background: linear-gradient(180deg, var(--bg-card) 0%, var(--bg-elevated) 100%);
  border: 1px solid var(--border-medium);
  border-radius: var(--radius-lg);
  padding: 22px;
  box-shadow: var(--shadow-strong);
  transition: transform .3s ease, border-color .3s ease;
}

.market-card:hover { border-color: rgba(41, 98, 255, 0.35); transform: translateY(-3px); }

.market-card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}

.market-icon {
  width: 42px; height: 42px;
  border-radius: 11px;
  background: var(--bg-primary);
  border: 1px solid var(--border-medium);
  display: grid; place-items: center;
  font-size: 1.2rem;
}

.market-meta { font-size: 0.82rem; color: var(--text-muted); font-weight: 500; }
.market-title { font-size: 1.05rem; font-weight: 600; color: var(--text-primary); margin-top: 2px; }

.market-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.option {
  padding: 12px 14px;
  border-radius: var(--radius-md);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border: 1px solid transparent;
}

.option .label { font-size: 0.95rem; }
.option .pct { font-size: 1.05rem; }

.option.yes { background: var(--yes-soft); color: var(--yes); border-color: rgba(30, 195, 115, 0.25); }
.option.no { background: var(--no-soft); color: var(--no); border-color: rgba(255, 77, 109, 0.25); }

.market-stats {
  margin-top: 16px;
  padding-top: 16px;
  border-top: 1px dashed var(--border-soft);
  display: flex; gap: 22px;
  font-size: 0.85rem;
  color: var(--text-muted);
}

.market-card.tilt-1 { transform: rotate(-1.2deg); }
.market-card.tilt-2 { transform: rotate(0.8deg); margin-inline-start: 30px; }

/* =========================================================
   Sections
   ========================================================= */

section { padding: 80px 0; }

.section-head {
  text-align: center;
  max-width: 720px;
  margin: 0 auto 56px;
}

.section-eyebrow {
  display: inline-block;
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  letter-spacing: 0.18em;
  color: var(--brand-light);
  text-transform: uppercase;
  margin-bottom: 14px;
}

.section-head h2 {
  font-size: clamp(1.8rem, 3.4vw, 2.6rem);
  letter-spacing: -0.015em;
  margin-bottom: 14px;
}

.section-head p {
  font-size: 1.05rem;
  color: var(--text-secondary);
}

/* Feature cards */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 22px;
}

.feature {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 30px;
  transition: border-color .3s ease, transform .3s ease;
  position: relative;
  overflow: hidden;
}

.feature::after {
  content: '';
  position: absolute;
  top: -40px;
  inset-inline-end: -40px;
  width: 140px; height: 140px;
  background: radial-gradient(circle, var(--brand-glow), transparent 70%);
  opacity: 0;
  transition: opacity .3s ease;
}

.feature:hover { border-color: var(--border-medium); transform: translateY(-4px); }
.feature:hover::after { opacity: 1; }

.feature-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.2), rgba(74, 158, 255, 0.08));
  border: 1px solid rgba(41, 98, 255, 0.3);
  display: grid; place-items: center;
  margin-bottom: 22px;
  position: relative; z-index: 1;
}

.feature-icon svg { width: 24px; height: 24px; color: var(--brand-light); }

.feature h3 { font-size: 1.2rem; margin-bottom: 10px; position: relative; z-index: 1; }
.feature p { font-size: 0.96rem; position: relative; z-index: 1; }

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 22px;
  counter-reset: step;
}

.step {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  position: relative;
}

.step::before {
  counter-increment: step;
  content: counter(step, arabic-indic);
  position: absolute;
  top: -18px;
  inset-inline-end: 24px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  color: #fff;
  display: grid; place-items: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.1rem;
  box-shadow: 0 6px 18px var(--brand-glow);
}

.step h3 { font-size: 1.1rem; margin: 12px 0 8px; }
.step p { font-size: 0.95rem; }

/* Categories */
.categories-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 18px;
}

.category {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 26px;
  transition: all .3s ease;
  display: block;
}

.category:hover {
  background: var(--bg-elevated);
  border-color: rgba(41, 98, 255, 0.4);
  transform: translateY(-3px);
}

.category-emoji { font-size: 1.8rem; margin-bottom: 14px; display: inline-block; }
.category h3 { font-size: 1.1rem; margin-bottom: 8px; }
.category p { font-size: 0.92rem; }

/* CTA banner */
.cta-banner {
  margin: 80px auto;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.18) 0%, rgba(74, 158, 255, 0.06) 100%);
  border: 1px solid rgba(41, 98, 255, 0.3);
  border-radius: var(--radius-xl);
  padding: 56px 48px;
  text-align: center;
  position: relative;
  overflow: hidden;
}

.cta-banner::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 0%, rgba(74, 158, 255, 0.2), transparent 60%);
  pointer-events: none;
}

.cta-banner h2 {
  font-size: clamp(1.6rem, 3vw, 2.2rem);
  margin-bottom: 14px;
  position: relative;
}

.cta-banner p {
  font-size: 1.05rem;
  margin-bottom: 28px;
  max-width: 560px;
  margin-inline: auto;
  position: relative;
}

.cta-banner .btn { position: relative; }

/* =========================================================
   Page header (sub-pages)
   ========================================================= */

.page-header {
  padding: 80px 0 50px;
  text-align: center;
  position: relative;
  border-bottom: 1px solid var(--border-soft);
}

.page-header::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 50% 60% at 50% 0%, rgba(41, 98, 255, 0.12), transparent 70%);
  pointer-events: none;
}

.page-header h1 {
  font-size: clamp(2rem, 4vw, 3rem);
  letter-spacing: -0.02em;
  margin-bottom: 16px;
  position: relative;
}

.page-header p {
  font-size: 1.1rem;
  max-width: 640px;
  margin-inline: auto;
  position: relative;
}

/* Content blocks */
.content-section { padding: 60px 0; }

.content-section + .content-section { border-top: 1px solid var(--border-soft); }

.content-grid {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 64px;
  align-items: start;
}

.content-grid h2 {
  font-size: clamp(1.6rem, 2.8vw, 2.2rem);
  margin-bottom: 14px;
  letter-spacing: -0.015em;
}

.content-grid .section-eyebrow { margin-bottom: 14px; }

.prose p { margin-bottom: 18px; font-size: 1.02rem; }
.prose p:last-child { margin-bottom: 0; }

.prose ul {
  list-style: none;
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.prose ul li {
  position: relative;
  padding-inline-start: 28px;
  color: var(--text-secondary);
  font-size: 1.02rem;
}

.prose ul li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  top: 11px;
  width: 14px; height: 14px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-light) 100%);
  box-shadow: 0 0 10px var(--brand-glow);
}

.prose ul li strong { color: var(--text-primary); font-weight: 700; }

/* Stats row */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-block: 24px;
}

.stat-card {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  padding: 18px 20px;
}

.stat-label { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 6px; }
.stat-value { font-size: 1.4rem; font-weight: 700; color: var(--text-primary); font-family: var(--font-display); }

/* Comparison table */
.comparison-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  overflow: hidden;
  margin-block: 24px;
}

.comparison-table th, .comparison-table td {
  padding: 16px 20px;
  text-align: start;
  border-bottom: 1px solid var(--border-soft);
}

.comparison-table th {
  background: var(--bg-elevated);
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text-primary);
  font-size: 0.95rem;
}

.comparison-table tr:last-child td { border-bottom: none; }
.comparison-table td { color: var(--text-secondary); font-size: 0.96rem; }
.comparison-table td:first-child { color: var(--text-primary); font-weight: 600; }

/* FAQ */
.faq-list { display: grid; gap: 14px; max-width: 880px; margin: 0 auto; }

.faq-item {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-md);
  overflow: hidden;
  transition: border-color .2s ease;
}

.faq-item[open] { border-color: rgba(41, 98, 255, 0.35); }

.faq-item summary {
  list-style: none;
  padding: 20px 24px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--text-primary);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
  content: '+';
  font-size: 1.5rem;
  font-weight: 300;
  color: var(--brand-light);
  transition: transform .2s ease;
  flex-shrink: 0;
}

.faq-item[open] summary::after { transform: rotate(45deg); }

.faq-item .faq-body {
  padding: 0 24px 22px;
  color: var(--text-secondary);
  font-size: 0.98rem;
  line-height: 1.85;
}

.faq-item .faq-body p + p { margin-top: 12px; }

/* Markets — full grid */
.markets-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 22px;
}

.market-tile {
  background: var(--bg-secondary);
  border: 1px solid var(--border-soft);
  border-radius: var(--radius-lg);
  padding: 28px;
  transition: all .3s ease;
}

.market-tile:hover {
  background: var(--bg-elevated);
  border-color: rgba(41, 98, 255, 0.3);
  transform: translateY(-3px);
}

.market-tile-head {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 16px;
}

.market-tile-icon {
  width: 52px; height: 52px;
  border-radius: 13px;
  background: linear-gradient(135deg, rgba(41, 98, 255, 0.18), rgba(74, 158, 255, 0.05));
  border: 1px solid rgba(41, 98, 255, 0.25);
  display: grid; place-items: center;
  font-size: 1.5rem;
}

.market-tile h3 { font-size: 1.2rem; }
.market-tile p { font-size: 0.96rem; margin-bottom: 16px; }

.market-tile-tags { display: flex; gap: 8px; flex-wrap: wrap; }
.market-tile-tags span {
  padding: 5px 12px;
  border-radius: 999px;
  background: var(--bg-elevated);
  border: 1px solid var(--border-soft);
  font-size: 0.82rem;
  color: var(--text-secondary);
  font-weight: 500;
}

/* =========================================================
   Footer
   ========================================================= */

.site-footer {
  margin-top: 60px;
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-soft);
  padding: 64px 0 28px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}

.footer-brand p {
  margin-top: 16px;
  font-size: 0.95rem;
  max-width: 320px;
}

.footer-col h4 {
  font-size: 0.85rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--text-muted);
  margin-bottom: 18px;
}

.footer-col ul { display: grid; gap: 10px; }

.footer-col a {
  color: var(--text-secondary);
  font-size: 0.95rem;
  transition: color .2s ease;
}

.footer-col a:hover { color: var(--text-primary); }

.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-soft);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
  font-size: 0.88rem;
  color: var(--text-muted);
}

.footer-bottom .legal { font-size: 0.85rem; }

/* =========================================================
   Responsive
   ========================================================= */

@media (max-width: 960px) {
  .nav-links {
    position: absolute;
    top: 100%;
    inset-inline-end: 16px;
    background: var(--bg-elevated);
    border: 1px solid var(--border-medium);
    border-radius: var(--radius-md);
    padding: 10px;
    flex-direction: column;
    align-items: stretch;
    min-width: 200px;
    box-shadow: var(--shadow-strong);
    display: none;
  }
  .nav-links.open { display: flex; }
  .nav-links a { padding: 10px 14px; }

  .menu-toggle { display: inline-flex; }

  .hero { padding: 56px 0; }
  .hero-grid { grid-template-columns: 1fr; gap: 48px; }
  .hero-visual { order: 2; }

  .features-grid { grid-template-columns: 1fr; }
  .steps { grid-template-columns: repeat(2, 1fr); }
  .categories-grid { grid-template-columns: repeat(2, 1fr); }
  .markets-grid { grid-template-columns: 1fr; }

  .content-grid { grid-template-columns: 1fr; gap: 28px; }
  .stats-row { grid-template-columns: repeat(2, 1fr); }

  .footer-grid { grid-template-columns: 1fr 1fr; gap: 36px; }
  .footer-brand { grid-column: 1 / -1; }

  .cta-banner { padding: 40px 26px; }

  .market-card.tilt-2 { margin-inline-start: 0; }
}

@media (max-width: 540px) {
  section { padding: 56px 0; }
  .hero h1 { font-size: 2rem; }
  .steps { grid-template-columns: 1fr; }
  .categories-grid { grid-template-columns: 1fr; }
  .stats-row { grid-template-columns: 1fr 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .nav-cta { padding: 9px 16px; font-size: 0.88rem; }
  .brand { font-size: 1.1rem; }

  .comparison-table th, .comparison-table td { padding: 12px 14px; font-size: 0.9rem; }
}

/* Animation: subtle fade-in on load */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(14px); }
  to { opacity: 1; transform: translateY(0); }
}

.hero-eyebrow, .hero h1, .hero p.lead, .hero-actions {
  animation: fadeUp .7s ease both;
}
.hero h1 { animation-delay: .08s; }
.hero p.lead { animation-delay: .16s; }
.hero-actions { animation-delay: .24s; }
.hero-visual { animation: fadeUp .9s ease .3s both; }
