/* =====================================================
   Polymarket Promo Site - Stylesheet
   ===================================================== */

:root {
  --bg: #ffffff;
  --bg-soft: #f7f8fa;
  --bg-card: #ffffff;
  --border: #e6e8eb;
  --border-strong: #d4d7dc;
  --text: #0d0d0d;
  --text-muted: #5b6168;
  --text-soft: #8a9099;
  --blue: #1652f0;
  --blue-hover: #0e3fc7;
  --blue-soft: #e8effd;
  --green: #00b86b;
  --green-soft: #d6f5e6;
  --red: #e64b4b;
  --red-soft: #fce0e0;
  --yellow: #f5a623;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md: 0 4px 12px rgba(15, 23, 42, 0.06);
  --shadow-lg: 0 12px 32px rgba(15, 23, 42, 0.08);
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 16px;
  --radius-pill: 999px;
  --container: 1200px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; display: block; }

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

/* ========== Header ========== */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 64px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 19px;
  letter-spacing: -0.02em;
  color: var(--text);
}

.brand:hover { text-decoration: none; }

.brand-mark {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 800;
  font-size: 16px;
  line-height: 1;
}

.nav-main {
  display: flex;
  align-items: center;
  gap: 30px;
}

.nav-main a {
  color: var(--text-muted);
  font-weight: 500;
  font-size: 15px;
  transition: color 0.15s ease;
}

.nav-main a:hover {
  color: var(--text);
  text-decoration: none;
}

.nav-main a.active { color: var(--text); }

.header-cta {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 20px;
  border-radius: var(--radius-md);
  font-weight: 600;
  font-size: 15px;
  font-family: inherit;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn:hover { text-decoration: none; }

.btn-primary {
  background: var(--blue);
  color: #fff;
}

.btn-primary:hover {
  background: var(--blue-hover);
  color: #fff;
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border-color: var(--border-strong);
}

.btn-ghost:hover {
  background: var(--bg-soft);
}

.btn-lg {
  padding: 14px 28px;
  font-size: 16px;
  border-radius: 12px;
}

.menu-toggle {
  display: none;
  background: none;
  border: none;
  padding: 8px;
  cursor: pointer;
  color: var(--text);
}

.menu-toggle svg { width: 24px; height: 24px; }

/* ========== Hero ========== */
.hero {
  padding: 80px 0 64px;
  background: linear-gradient(180deg, #f7f8fa 0%, #ffffff 100%);
  border-bottom: 1px solid var(--border);
}

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

.hero h1 {
  font-size: 56px;
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.035em;
  margin: 0 0 20px;
}

.hero h1 .accent { color: var(--blue); }

.hero p.lead {
  font-size: 19px;
  line-height: 1.55;
  color: var(--text-muted);
  margin: 0 0 32px;
  max-width: 540px;
}

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

.hero-stats {
  display: flex;
  gap: 40px;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--border);
}

.hero-stat .num {
  font-size: 26px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
}

.hero-stat .lbl {
  font-size: 13px;
  color: var(--text-muted);
  margin-top: 2px;
}

/* Hero card showcase */
.hero-cards {
  position: relative;
}

.market-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-md);
}

.market-card + .market-card { margin-top: 16px; }

.market-card .meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.market-card .category {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  background: var(--bg-soft);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
}

.market-card h3 {
  font-size: 17px;
  font-weight: 600;
  line-height: 1.35;
  margin: 0 0 16px;
}

.market-card .outcomes {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.outcome-btn {
  padding: 10px 12px;
  border-radius: 8px;
  font-weight: 600;
  font-size: 14px;
  text-align: center;
  border: 1px solid transparent;
}

.outcome-yes {
  background: var(--green-soft);
  color: var(--green);
}

.outcome-no {
  background: var(--red-soft);
  color: var(--red);
}

.hero-card-rotate-1 { transform: rotate(-2deg); position: relative; z-index: 2; }
.hero-card-rotate-2 { transform: rotate(1.5deg); margin-top: -8px; position: relative; z-index: 1; }

/* ========== Sections ========== */
section { padding: 80px 0; }
section.tight { padding: 56px 0; }

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

.section-header.left { text-align: left; margin-left: 0; }

.eyebrow {
  display: inline-block;
  font-size: 13px;
  font-weight: 600;
  color: var(--blue);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 12px;
}

h2 {
  font-size: 40px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.025em;
  margin: 0 0 16px;
}

h3 {
  font-size: 22px;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.015em;
  margin: 0 0 8px;
}

.section-header p {
  font-size: 18px;
  color: var(--text-muted);
  margin: 0;
}

/* ========== Category grid ========== */
.category-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}

.category-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 24px;
  transition: all 0.18s ease;
  color: var(--text);
}

.category-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-md);
  transform: translateY(-2px);
  text-decoration: none;
}

.category-icon {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  background: var(--blue-soft);
  color: var(--blue);
  display: grid;
  place-items: center;
  margin-bottom: 18px;
}

.category-icon svg { width: 22px; height: 22px; }

.category-card h3 {
  font-size: 17px;
  margin: 0 0 6px;
}

.category-card p {
  font-size: 14px;
  color: var(--text-muted);
  margin: 0;
  line-height: 1.5;
}

/* ========== Steps ========== */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 56px;
}

.step {
  position: relative;
}

.step .num {
  width: 36px;
  height: 36px;
  border-radius: 10px;
  background: var(--text);
  color: #fff;
  display: grid;
  place-items: center;
  font-weight: 700;
  font-size: 16px;
  margin-bottom: 18px;
}

.step h3 { margin-bottom: 8px; }

.step p {
  color: var(--text-muted);
  margin: 0;
  line-height: 1.6;
}

/* ========== Features ========== */
.features {
  background: var(--bg-soft);
}

.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.feature-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.feature-icon {
  width: 48px;
  height: 48px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  margin-bottom: 20px;
  background: var(--blue-soft);
  color: var(--blue);
}

.feature-icon svg { width: 24px; height: 24px; }

.feature-card h3 {
  font-size: 19px;
  margin-bottom: 8px;
}

.feature-card p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}

/* ========== CTA band ========== */
.cta-band {
  background: var(--text);
  color: #fff;
  border-radius: var(--radius-lg);
  padding: 64px 56px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 32px;
  flex-wrap: wrap;
}

.cta-band h2 {
  color: #fff;
  margin: 0 0 8px;
  font-size: 32px;
}

.cta-band p {
  color: rgba(255,255,255,0.7);
  margin: 0;
  font-size: 17px;
}

.cta-band .btn-primary {
  background: #fff;
  color: var(--text);
}

.cta-band .btn-primary:hover {
  background: var(--bg-soft);
}

/* ========== Page header (sub pages) ========== */
.page-header {
  padding: 64px 0 32px;
  background: var(--bg-soft);
  border-bottom: 1px solid var(--border);
}

.page-header .crumbs {
  font-size: 14px;
  color: var(--text-muted);
  margin-bottom: 16px;
}

.page-header .crumbs a { color: var(--text-muted); }

.page-header h1 {
  font-size: 48px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin: 0 0 12px;
  line-height: 1.1;
}

.page-header p.lead {
  font-size: 19px;
  color: var(--text-muted);
  max-width: 720px;
  margin: 0;
}

/* ========== Content layout ========== */
.content-wrap {
  padding: 64px 0;
}

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

.toc {
  position: sticky;
  top: 88px;
  border-left: 1px solid var(--border);
  padding-left: 20px;
}

.toc-title {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin-bottom: 14px;
}

.toc ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.toc a {
  color: var(--text-muted);
  font-size: 14px;
  display: block;
  padding: 4px 0;
}

.toc a:hover { color: var(--text); text-decoration: none; }

.prose {
  font-size: 17px;
  line-height: 1.7;
  color: var(--text);
  max-width: 760px;
}

.prose h2 {
  font-size: 30px;
  margin: 48px 0 16px;
  scroll-margin-top: 88px;
}

.prose h2:first-child { margin-top: 0; }

.prose h3 {
  font-size: 21px;
  margin: 32px 0 10px;
}

.prose p { margin: 0 0 16px; color: var(--text); }

.prose p.muted { color: var(--text-muted); }

.prose ul, .prose ol {
  margin: 0 0 20px;
  padding-left: 22px;
}

.prose li { margin-bottom: 8px; }

.prose strong { font-weight: 600; }

.callout {
  background: var(--blue-soft);
  border-left: 3px solid var(--blue);
  padding: 18px 22px;
  border-radius: 8px;
  margin: 28px 0;
  font-size: 15px;
  color: var(--text);
}

.callout strong { color: var(--blue); }

/* ========== FAQ ========== */
.faq-list {
  max-width: 820px;
  margin: 0 auto;
}

.faq-item {
  border-bottom: 1px solid var(--border);
  padding: 24px 0;
}

.faq-item:first-child { padding-top: 0; }

.faq-item h3 {
  font-size: 19px;
  font-weight: 600;
  margin: 0 0 10px;
  display: flex;
  align-items: flex-start;
  gap: 14px;
}

.faq-item h3::before {
  content: 'Q';
  flex-shrink: 0;
  width: 26px;
  height: 26px;
  border-radius: 6px;
  background: var(--blue);
  color: #fff;
  display: grid;
  place-items: center;
  font-size: 13px;
  font-weight: 700;
  margin-top: 1px;
}

.faq-item p {
  margin: 0 0 0 40px;
  color: var(--text-muted);
  font-size: 16px;
  line-height: 1.65;
}

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

/* ========== Markets page specific ========== */
.markets-overview {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 24px;
  margin-bottom: 56px;
}

.market-type {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 32px;
}

.market-type h3 {
  font-size: 20px;
  margin-bottom: 12px;
}

.market-type p {
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.6;
  margin: 0;
}

.example-list {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
}

.example-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 22px;
}

.example-card .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.06em;
  margin-bottom: 10px;
}

.example-card .q {
  font-size: 16px;
  font-weight: 600;
  line-height: 1.4;
  margin: 0 0 14px;
}

.example-card .pair {
  display: flex;
  gap: 8px;
}

.example-card .pair span {
  flex: 1;
  text-align: center;
  padding: 8px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 600;
}

/* ========== About page bits ========== */
.values-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 32px;
  margin-top: 48px;
}

.value-block h3 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 18px;
  margin-bottom: 10px;
}

.value-block h3::before {
  content: '';
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--blue);
}

.value-block p {
  color: var(--text-muted);
  margin: 0;
  font-size: 15px;
  line-height: 1.65;
}

/* ========== Footer ========== */
.site-footer {
  background: var(--bg-soft);
  border-top: 1px solid var(--border);
  padding: 64px 0 32px;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;
  gap: 56px;
  margin-bottom: 40px;
}

.footer-brand .brand { margin-bottom: 14px; }

.footer-brand p {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.65;
  margin: 0;
  max-width: 360px;
}

.footer-col h4 {
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--text-soft);
  margin: 0 0 14px;
}

.footer-col p.col-intro {
  color: var(--text-muted);
  font-size: 14px;
  line-height: 1.6;
  margin: 0 0 16px;
}

.footer-col ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-col a {
  color: var(--text-muted);
  font-size: 14px;
}

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

.footer-col .contact-line {
  font-size: 14px;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 10px;
}

.footer-col .contact-line .label {
  font-size: 12px;
  font-weight: 600;
  color: var(--text-soft);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  min-width: 60px;
}

/* ===== Language selector section ===== */
.footer-lang {
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
  margin-bottom: 24px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  flex-wrap: wrap;
}

.footer-lang .lang-heading {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text-soft);
  font-size: 13px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.footer-lang .lang-heading svg {
  width: 16px;
  height: 16px;
  color: var(--text-muted);
}

.lang-selector {
  position: relative;
}

.lang-selector > summary {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 10px 16px;
  background: #fff;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-pill);
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  cursor: pointer;
  user-select: none;
  list-style: none;
  transition: all 0.15s ease;
  min-width: 180px;
  justify-content: space-between;
}

.lang-selector > summary::-webkit-details-marker { display: none; }
.lang-selector > summary::marker { display: none; }

.lang-selector > summary:hover {
  border-color: var(--text);
  background: var(--bg-soft);
}

.lang-selector > summary:focus-visible {
  outline: 2px solid var(--blue);
  outline-offset: 2px;
}

.lang-selector .current {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.lang-selector .current svg {
  width: 16px;
  height: 16px;
  color: var(--blue);
}

.lang-selector .chevron {
  width: 14px;
  height: 14px;
  color: var(--text-muted);
  transition: transform 0.2s ease;
}

.lang-selector[open] .chevron {
  transform: rotate(180deg);
}

.lang-menu {
  position: absolute;
  bottom: calc(100% + 10px);
  right: 0;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 10px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  min-width: 320px;
  z-index: 10;
}

.lang-option {
  background: none;
  border: none;
  padding: 10px 14px;
  text-align: left;
  font-size: 14px;
  font-family: inherit;
  color: var(--text);
  border-radius: 8px;
  cursor: pointer;
  transition: background 0.12s ease, color 0.12s ease;
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.lang-option:hover {
  background: var(--bg-soft);
  text-decoration: none;
  color: var(--text);
}

.lang-option.active {
  background: var(--blue-soft);
  color: var(--blue);
  font-weight: 600;
  pointer-events: none;
}

.lang-option .iso {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-soft);
  letter-spacing: 0.05em;
  margin-left: auto;
}

.lang-option.active .iso {
  color: var(--blue);
}

.lang-option[aria-disabled="true"] {
  opacity: 0.45;
  cursor: not-allowed;
  pointer-events: none;
}

/* ===== RTL adjustments (Arabic) ===== */
[dir="rtl"] body {
  font-family: 'Inter', 'Noto Sans Arabic', -apple-system, system-ui, sans-serif;
}
[dir="rtl"] .toc {
  border-left: none;
  border-right: 1px solid var(--border);
  padding-left: 0;
  padding-right: 20px;
}
[dir="rtl"] .callout {
  border-left: none;
  border-right: 3px solid var(--blue);
}
[dir="rtl"] .faq-item h3 { flex-direction: row; }
[dir="rtl"] .faq-item p { margin: 0 40px 0 0; }
[dir="rtl"] .prose ul, [dir="rtl"] .prose ol { padding-left: 0; padding-right: 22px; }
[dir="rtl"] .lang-menu { right: auto; left: 0; }
[dir="rtl"] .lang-option { text-align: right; }
[dir="rtl"] .lang-option .iso { margin-left: 0; margin-right: auto; }
[dir="rtl"] .contact-line { flex-direction: row; }
[dir="rtl"] .step .num,
[dir="rtl"] .category-icon,
[dir="rtl"] .feature-icon { margin-left: 0; }
[dir="rtl"] .hero-card-rotate-1 { transform: rotate(2deg); }
[dir="rtl"] .hero-card-rotate-2 { transform: rotate(-1.5deg); }
[dir="rtl"] .market-card .category { font-family: inherit; }
[dir="rtl"] .crumbs { direction: rtl; }

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 13px;
  color: var(--text-soft);
}

.footer-bottom p { margin: 0; }

/* ========== Responsive ========== */
@media (max-width: 960px) {
  .hero { padding: 56px 0 40px; }
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero h1 { font-size: 40px; }
  .hero p.lead { font-size: 17px; }
  .hero-stats { gap: 24px; flex-wrap: wrap; }
  section { padding: 56px 0; }
  h2 { font-size: 30px; }
  .category-grid { grid-template-columns: repeat(2, 1fr); }
  .steps { grid-template-columns: 1fr; gap: 24px; }
  .features-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 40px; }
  .footer-brand { grid-column: 1 / -1; }
  .content-grid { grid-template-columns: 1fr; gap: 32px; }
  .toc { position: static; border-left: none; border-top: 1px solid var(--border); padding: 16px 0 0; }
  .toc ul { flex-direction: row; flex-wrap: wrap; gap: 8px 18px; }
  .markets-overview { grid-template-columns: 1fr; }
  .values-grid { grid-template-columns: 1fr; }
  .example-list { grid-template-columns: 1fr; }
  .cta-band { padding: 40px 28px; flex-direction: column; align-items: flex-start; text-align: left; }
  .page-header h1 { font-size: 36px; }
}

@media (max-width: 720px) {
  .nav-main { display: none; }
  .nav-main.open {
    display: flex;
    flex-direction: column;
    position: absolute;
    top: 64px;
    left: 0;
    right: 0;
    background: #fff;
    padding: 16px 24px 20px;
    border-bottom: 1px solid var(--border);
    gap: 14px;
    align-items: flex-start;
  }
  .menu-toggle { display: inline-flex; }
  .header-cta .btn-ghost { display: none; }
  .header-cta .btn-primary { padding: 9px 16px; font-size: 14px; }
  .hero h1 { font-size: 34px; }
  h2 { font-size: 26px; }
  .container { padding: 0 18px; }
  .cta-band { padding: 32px 22px; }
  .feature-card, .market-type { padding: 24px; }
  .faq-item p { margin-left: 0; }
}

@media (max-width: 480px) {
  .category-grid { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .hero-stats { gap: 20px; }
  .hero-stat .num { font-size: 22px; }
  .lang-menu {
    grid-template-columns: 1fr;
    min-width: 240px;
    right: auto;
    left: 0;
  }
  .lang-selector > summary { min-width: 0; width: 100%; }
  .footer-lang { flex-direction: column; align-items: flex-start; gap: 14px; }
}
