/* ═══════════════════════════════════════════════════════════════════
   ApexTrades — Marketing Homepage
   Matches the Bluecrest portal design system (light, clean, soft).
   ═══════════════════════════════════════════════════════════════════ */

:root {
  /* Bluecrest accent palette — identical to the portal */
  --accent:           #2962ff;
  --accent-hover:     #1d4ed8;
  --accent-light:     #5b87ff;
  --accent-soft:      rgba(41, 98, 255, 0.10);
  --accent-soft-2:    rgba(41, 98, 255, 0.06);
  --accent-ink:       #1d4ed8;

  --success:          #059669;
  --success-soft:     #d1fae5;
  --success-ink:      #047857;

  /* Surfaces — light, clean, soft (matches the portal dashboard) */
  --bg-primary:       #ffffff;
  --bg-secondary:     #f8fafc;
  --bg-tertiary:      #f1f5f9;
  --card-bg:          #ffffff;
  --card-bg-soft:     #fbfcfe;

  /* Borders — subtle */
  --border-subtle:    #e2e8f0;
  --border-medium:    #cbd5e1;
  --border-hover:     #2962ff;

  /* Text — Tailwind slate ramp */
  --text-strong:      #0f172a;
  --text-primary:     #1e293b;
  --text-secondary:   #475569;
  --text-muted:       #64748b;
  --text-faint:       #94a3b8;

  --radius-sm:        10px;
  --radius-md:        14px;
  --radius-lg:        18px;
  --radius-xl:        24px;
  --radius-pill:      999px;

  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;
  --font-body:    'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', system-ui, sans-serif;

  --shadow-sm:        0 1px 2px rgba(15, 23, 42, 0.04);
  --shadow-md:        0 4px 16px rgba(15, 23, 42, 0.06);
  --shadow-lg:        0 12px 32px rgba(15, 23, 42, 0.08);
  --shadow-accent:    0 8px 20px rgba(41, 98, 255, 0.20);
}

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

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  background: var(--bg-primary);
  color: var(--text-primary);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

a { text-decoration: none; color: inherit; transition: color 0.2s ease; }
img { max-width: 100%; height: auto; display: block; }
button { cursor: pointer; font-family: var(--font-body); border: none; background: none; }
::placeholder { color: var(--text-faint); }

/* ─── Layout ────────────────────────────────────────────────────── */
.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 24px;
}

/* ─── Navbar ────────────────────────────────────────────────────── */
.navbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  padding: 18px 0;
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: background 0.3s ease, border-color 0.3s ease, padding 0.3s ease, box-shadow 0.3s ease;
}
.navbar.scrolled {
  background: rgba(255, 255, 255, 0.92);
  border-bottom-color: var(--border-subtle);
  padding: 12px 0;
  box-shadow: var(--shadow-sm);
}
.navbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.navbar-logo {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}
.navbar-logo img {
  height: 32px;
  width: auto;
}
.navbar-links {
  display: flex;
  align-items: center;
  gap: 32px;
}
.navbar-links a {
  font-size: 14px;
  font-weight: 500;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.navbar-links a:hover { color: var(--accent); }
.navbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

/* ─── Buttons ───────────────────────────────────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  height: 40px;
  padding: 0 18px;
  border-radius: var(--radius-pill);
  font-size: 13.5px;
  font-weight: 600;
  font-family: var(--font-body);
  letter-spacing: -0.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.15s ease, box-shadow 0.2s ease, border-color 0.2s ease;
  text-decoration: none;
  line-height: 1;
}
.btn:active { transform: translateY(1px); }

.btn-outline {
  background: transparent;
  color: var(--text-primary);
  border: 1px solid var(--border-subtle);
}
.btn-outline:hover {
  background: var(--accent-soft);
  color: var(--accent-ink);
  border-color: var(--accent);
}

.btn-primary {
  background: var(--accent);
  color: #ffffff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover {
  background: var(--accent-hover);
  color: #ffffff;
  box-shadow: 0 12px 28px rgba(41, 98, 255, 0.30);
  transform: translateY(-1px);
}

.btn-lg {
  height: 48px;
  padding: 0 24px;
  font-size: 15px;
}
.btn-block {
  width: 100%;
}

/* ─── Mobile menu ───────────────────────────────────────────────── */
.navbar-mobile-toggle {
  display: none;
  padding: 8px;
  color: var(--text-primary);
}
.navbar-mobile-menu {
  display: none;
  flex-direction: column;
  gap: 8px;
  padding: 16px 24px 20px;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: saturate(180%) blur(14px);
  border-top: 1px solid var(--border-subtle);
}
.navbar-mobile-menu.open { display: flex; }
.navbar-mobile-menu a {
  padding: 10px 0;
  font-size: 15px;
  font-weight: 500;
  color: var(--text-secondary);
  border-bottom: 1px solid var(--border-subtle);
}
.navbar-mobile-menu a:last-of-type { border-bottom: none; }
.navbar-mobile-menu a.btn { border-bottom: none; padding: 0 18px; }

@media (max-width: 768px) {
  .navbar-links, .navbar-actions { display: none; }
  .navbar-mobile-toggle { display: inline-flex; }
}

/* ─── Hero ──────────────────────────────────────────────────────── */
.hero {
  position: relative;
  padding: 160px 0 90px;
  overflow: hidden;
  background: var(--bg-primary);
}
.hero-grid-bg {
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse 60% 50% at 80% 30%, var(--accent-soft), transparent 70%),
    radial-gradient(ellipse 40% 30% at 0% 100%, rgba(16, 185, 129, 0.06), transparent 70%);
  pointer-events: none;
  z-index: 0;
}
.hero .container {
  position: relative;
  z-index: 1;
}
.hero-content {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 56px;
  align-items: center;
}
.hero-text { max-width: 560px; }
.hero-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 8px;
  background: var(--accent-soft);
  border: 1px solid rgba(41, 98, 255, 0.18);
  border-radius: var(--radius-pill);
  margin-bottom: 24px;
}
.hero-badge-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
  animation: pulse 2.4s ease-in-out infinite;
}
.hero-badge span {
  font-size: 12px;
  font-weight: 600;
  color: var(--accent-ink);
  letter-spacing: 0.01em;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(0.85); }
}
.hero h1 {
  font-size: clamp(36px, 5.5vw, 60px);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.03em;
  margin-bottom: 22px;
  color: var(--text-strong);
}
.hero h1 .gradient {
  color: var(--accent);
}
.hero p {
  font-size: clamp(15px, 1.4vw, 17px);
  color: var(--text-secondary);
  margin-bottom: 32px;
  max-width: 510px;
  line-height: 1.65;
}
.hero-buttons {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}
.hero-image {
  position: relative;
}
.hero-image img {
  position: relative;
  z-index: 1;
  border-radius: var(--radius-lg);
  filter: drop-shadow(0 20px 40px rgba(15, 23, 42, 0.10));
}
.hero-image-glow {
  position: absolute;
  inset: -10%;
  background: radial-gradient(ellipse at center, var(--accent-soft), transparent 65%);
  filter: blur(40px);
  pointer-events: none;
}
@media (max-width: 900px) {
  .hero-content { grid-template-columns: 1fr; gap: 40px; text-align: center; }
  .hero-text { max-width: 100%; }
  .hero-buttons { justify-content: center; }
  .hero p { margin-left: auto; margin-right: auto; }
  .hero-badge { margin-left: auto; margin-right: auto; }
  .hero { padding: 130px 0 70px; }
}

/* ─── Feature strip ─────────────────────────────────────────────── */
.feature-strip {
  padding: 40px 0 60px;
  background: var(--bg-primary);
}
.feature-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 16px;
}
.feature-card {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 28px 24px;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.feature-card:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.feature-card .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--accent);
  margin-bottom: 18px;
}
.feature-card h3 {
  font-size: 16.5px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 8px;
  letter-spacing: -0.01em;
}
.feature-card p {
  font-size: 13.5px;
  color: var(--text-muted);
  line-height: 1.6;
}

/* ─── Generic sections ──────────────────────────────────────────── */
.section { padding: 100px 0; }
.section-dark { background: var(--bg-primary); }
.section-darker { background: var(--bg-secondary); }

.section-label {
  display: inline-block;
  padding: 5px 14px;
  background: var(--accent-soft);
  border-radius: var(--radius-pill);
  font-size: 11px;
  font-weight: 700;
  color: var(--accent-ink);
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 18px;
}
.section-title {
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  color: var(--text-strong);
  line-height: 1.15;
  letter-spacing: -0.03em;
  margin-bottom: 18px;
  max-width: 600px;
}
.section-subtitle {
  font-size: 16px;
  color: var(--text-secondary);
  line-height: 1.65;
  max-width: 540px;
}

/* ─── Split layout ──────────────────────────────────────────────── */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}
.split-reverse { direction: rtl; }
.split-reverse > * { direction: ltr; }
@media (max-width: 900px) {
  .split { grid-template-columns: 1fr; gap: 40px; }
  .split-reverse { direction: ltr; }
}

.about-image-wrapper {
  position: relative;
  border-radius: var(--radius-xl);
  overflow: hidden;
  aspect-ratio: 4 / 3;
  box-shadow: var(--shadow-md);
}
.about-image-wrapper img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.about-image-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(135deg, transparent 50%, rgba(41, 98, 255, 0.12));
  pointer-events: none;
}

.checklist {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 14px;
  margin-top: 28px;
}
.checklist li {
  display: flex;
  align-items: center;
  gap: 14px;
  font-size: 15px;
  color: var(--text-primary);
  font-weight: 500;
}
.checklist-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--success-soft);
  color: var(--success-ink);
  flex-shrink: 0;
}

/* ─── Features grid (6 items) ───────────────────────────────────── */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 56px;
}
.features-grid-item {
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px 24px;
  text-align: center;
  transition: border-color 0.2s ease, transform 0.2s ease, box-shadow 0.2s ease;
  box-shadow: var(--shadow-sm);
}
.features-grid-item:hover {
  border-color: var(--accent);
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
}
.features-grid-item .icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 56px;
  height: 56px;
  border-radius: 14px;
  margin-bottom: 16px;
  background: var(--accent-soft);
  color: var(--accent);
}
.features-grid-item h4 {
  font-size: 15px;
  font-weight: 700;
  color: var(--text-strong);
  letter-spacing: -0.01em;
}

/* ─── Stats section ─────────────────────────────────────────────── */
.stats-section {
  position: relative;
  overflow: hidden;
  background: var(--bg-secondary);
}
.stats-map-bg {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 90%;
  max-width: 900px;
  opacity: 0.06;
  pointer-events: none;
}
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 32px;
  position: relative;
  z-index: 1;
}
.stat-item h3 {
  font-size: clamp(36px, 5vw, 56px);
  font-weight: 800;
  color: var(--accent);
  margin-bottom: 8px;
  letter-spacing: -0.03em;
  line-height: 1;
}
.stat-item p {
  font-size: 14px;
  color: var(--text-muted);
  font-weight: 500;
}

/* ─── CTA box ───────────────────────────────────────────────────── */
.cta-box {
  position: relative;
  text-align: center;
  padding: 64px 32px;
  background: var(--card-bg);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.cta-glow {
  position: absolute;
  width: 360px;
  height: 360px;
  border-radius: 50%;
  background: var(--accent-soft);
  filter: blur(80px);
  top: -80px;
  left: -80px;
  pointer-events: none;
}

/* ─── Footer ────────────────────────────────────────────────────── */
.footer {
  background: var(--bg-secondary);
  border-top: 1px solid var(--border-subtle);
  padding: 64px 0 32px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
}
@media (max-width: 768px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}
.footer-brand p {
  font-size: 13px;
  color: var(--text-muted);
  line-height: 1.65;
  margin-top: 16px;
  max-width: 360px;
}
.footer h4 {
  font-size: 13px;
  font-weight: 700;
  color: var(--text-strong);
  margin-bottom: 18px;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.footer-links {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer-links a {
  font-size: 14px;
  color: var(--text-secondary);
  transition: color 0.2s ease;
}
.footer-links a:hover { color: var(--accent); }
.footer-bottom {
  padding-top: 28px;
  border-top: 1px solid var(--border-subtle);
  text-align: center;
  font-size: 13px;
  color: var(--text-faint);
}

/* ─── Reveal-on-scroll animation ────────────────────────────────── */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.16, 1, 0.3, 1), transform 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

.fade-up {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeUp 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
.fade-up-d1 { animation-delay: 0.08s; }
.fade-up-d2 { animation-delay: 0.16s; }
.fade-up-d3 { animation-delay: 0.24s; }
.fade-up-d4 { animation-delay: 0.32s; }
@keyframes fadeUp {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Translator widget — keep visible without ugly purple box ─── */
.translator-wrap {
  position: relative;
  z-index: 1100;
  pointer-events: none;
}
.translator-wrap .gtranslate_wrapper { pointer-events: auto; }
.gt_float_switcher {
  font-family: var(--font-body) !important;
  font-size: 11px !important;
  border-radius: var(--radius-sm) !important;
  background: rgba(255, 255, 255, 0.92) !important;
  backdrop-filter: saturate(180%) blur(8px);
  border: 1px solid var(--border-subtle) !important;
  color: var(--text-primary) !important;
}

@media (max-width: 768px) {
  .gtranslate_wrapper { display: none; }
}

/* ─── A11y ──────────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
  .reveal { opacity: 1; transform: none; }
  .fade-up { opacity: 1; transform: none; animation: none; }
}
