/* =========================================
   APEXTRADE — Theme CSS
   ========================================= */

:root {
  --bg: #0B1D2A;
  --bg-alt: #0D2535;
  --surface: #12293D;
  --surface-2: #163347;
  --accent: #D4A843;
  --accent-dim: rgba(212,168,67,0.15);
  --text: #F5F0E8;
  --text-dim: rgba(245,240,232,0.55);
  --text-muted: rgba(245,240,232,0.3);
  --border: rgba(245,240,232,0.08);
  --green: #4ADE80;
  --green-dim: rgba(74,222,128,0.12);
  --font-display: 'Playfair Display', Georgia, serif;
  --font-body: 'DM Sans', system-ui, sans-serif;
}

/* ---- RESET & BASE ---- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-weight: 400;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* ---- NAV ---- */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  background: rgba(11,29,42,0.85);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
  padding: 0 48px;
}
.nav-inner {
  max-width: 1280px;
  margin: 0 auto;
  height: 64px;
  display: flex;
  align-items: center;
  gap: 12px;
}
.nav-logo {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 500;
  color: var(--text);
  letter-spacing: 0.02em;
}
.nav-badge {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent);
  background: var(--accent-dim);
  border: 1px solid rgba(212,168,67,0.25);
  padding: 4px 10px;
  border-radius: 20px;
}

/* ---- HERO ---- */
.hero {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
  padding-top: 64px;
  overflow: hidden;
}
.hero-content {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 80px 64px 80px 80px;
}
.hero-eyebrow {
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 20px;
}
.hero-headline {
  font-family: var(--font-display);
  font-size: clamp(40px, 4.5vw, 68px);
  font-weight: 400;
  line-height: 1.1;
  color: var(--text);
  margin-bottom: 28px;
  letter-spacing: -0.01em;
}
.hero-sub {
  font-size: 16px;
  line-height: 1.7;
  color: var(--text-dim);
  max-width: 440px;
}
.hero-visual {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px;
}
.hero-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}
.hero-overlay {
  position: relative;
  z-index: 1;
  width: 100%;
}

/* Terminal Card */
.terminal-card {
  background: rgba(11,29,42,0.85);
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  backdrop-filter: blur(20px);
}
.terminal-header {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--border);
  background: var(--surface);
}
.terminal-dot { width: 10px; height: 10px; border-radius: 50%; }
.terminal-dot.red { background: #FF5F57; }
.terminal-dot.yellow { background: #FEBC2E; }
.terminal-dot.green { background: #28C840; }
.terminal-title {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.12em;
  color: var(--text-muted);
  margin-left: 8px;
}
.terminal-body { padding: 16px 18px; }
.trow {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  padding: 8px 0;
  font-size: 13px;
  gap: 16px;
  align-items: center;
}
.trow-head {
  color: var(--text-muted);
  font-size: 10px;
  letter-spacing: 0.12em;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  padding-bottom: 8px;
  margin-bottom: 4px;
}
.trow-active { border-bottom: 1px solid var(--border); }
.trow-dim { color: var(--text-muted); }
.live-dot {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--green);
  font-size: 11px;
  font-weight: 600;
}
.dot-pulse {
  width: 6px; height: 6px;
  background: var(--green);
  border-radius: 50%;
  display: inline-block;
  animation: pulse 1.5s ease-in-out infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(0.85); }
}
.pct { text-align: right; color: var(--green); font-weight: 600; }
.pct.muted { color: var(--text-muted); }
.terminal-footer {
  padding: 12px 18px;
  background: var(--surface);
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 12px;
  color: var(--text-dim);
}
.val { font-weight: 600; font-size: 15px; color: var(--text); }

/* ---- HOW IT WORKS ---- */
.hiw {
  padding: 120px 80px;
  border-top: 1px solid var(--border);
}
.hiw-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.hiw-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 64px;
  max-width: 600px;
}
.hiw-steps {
  display: grid;
  grid-template-columns: 1fr 48px 1fr 48px 1fr 48px 1fr;
  align-items: start;
  gap: 0;
}
.step { padding-right: 32px; }
.step-num {
  font-family: var(--font-display);
  font-size: 48px;
  font-weight: 400;
  color: var(--accent);
  margin-bottom: 16px;
  line-height: 1;
}
.step-title {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 10px;
  letter-spacing: 0.02em;
}
.step-desc {
  font-size: 14px;
  line-height: 1.65;
  color: var(--text-dim);
}
.step-connector {
  display: flex;
  align-items: center;
  padding-top: 20px;
}
.step-connector::after {
  content: '';
  display: block;
  width: 24px;
  height: 1px;
  background: var(--accent);
  opacity: 0.4;
}

/* ---- DIFFERENTIATOR ---- */
.diff {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.diff-inner {
  padding: 120px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: start;
}
.diff-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.diff-headline {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.5vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 24px;
}
.diff-body {
  font-size: 15px;
  line-height: 1.75;
  color: var(--text-dim);
}
.diff-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.dcard {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 24px;
}
.dcard-icon {
  width: 44px;
  height: 44px;
  background: var(--accent-dim);
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 14px;
}
.dcard-title {
  font-size: 15px;
  font-weight: 600;
  margin-bottom: 8px;
}
.dcard-desc {
  font-size: 13px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---- ARCHITECTURE ---- */
.arch {
  padding: 120px 80px;
  border-top: 1px solid var(--border);
}
.arch-label {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.arch-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 3.5vw, 52px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 56px;
}
.arch-img-wrap {
  position: relative;
  height: 400px;
  border-radius: 16px;
  overflow: hidden;
  border: 1px solid var(--border);
}
.arch-img { border-radius: 16px; }
.arch-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, rgba(11,29,42,0.92) 0%, rgba(11,29,42,0.75) 100%);
  padding: 40px;
}
.arch-diagram {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  margin-bottom: 28px;
}
.a-row {
  display: flex;
  gap: 16px;
}
.abox {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.08em;
  padding: 10px 16px;
  border-radius: 8px;
}
.abox-green {
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,0.25);
  color: var(--green);
}
.abox-dim {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text-dim);
}
.a-row-center { margin: 8px 0; }
.amind {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-dim);
  border: 1px solid rgba(212,168,67,0.3);
  color: var(--accent);
  font-size: 13px;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 10px;
  letter-spacing: 0.04em;
}
.arch-caption {
  font-size: 13px;
  color: var(--text-dim);
  text-align: center;
}

/* ---- PERFORMANCE ---- */
.perf {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
}
.perf-inner {
  padding: 120px 80px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 80px;
  align-items: center;
}
.perf-left { position: relative; }
.perf-img {
  width: 100%;
  height: 400px;
  object-fit: cover;
  border-radius: 16px;
  opacity: 0.6;
}
.perf-right {}
.perf-eyebrow {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--accent);
  margin-bottom: 20px;
}
.perf-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 2.5vw, 42px);
  font-weight: 400;
  line-height: 1.2;
  margin-bottom: 36px;
}
.perf-points { display: flex; flex-direction: column; gap: 20px; }
.pp {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.pp-icon {
  width: 28px;
  height: 28px;
  background: var(--green-dim);
  border: 1px solid rgba(74,222,128,0.2);
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 2px;
}
.pp p {
  font-size: 14px;
  line-height: 1.6;
  color: var(--text-dim);
}

/* ---- CLOSING ---- */
.closing {
  padding: 140px 80px;
  border-top: 1px solid var(--border);
  text-align: center;
}
.closing-inner { max-width: 700px; margin: 0 auto; }
.closing-title {
  font-family: var(--font-display);
  font-size: clamp(36px, 4vw, 60px);
  font-weight: 400;
  line-height: 1.15;
  margin-bottom: 28px;
}
.closing-body {
  font-size: 17px;
  line-height: 1.75;
  color: var(--text-dim);
  margin-bottom: 16px;
}
.closing-sub {
  font-size: 14px;
  color: var(--text-muted);
  line-height: 1.7;
}

/* ---- FOOTER ---- */
.footer {
  border-top: 1px solid var(--border);
  padding: 48px 80px;
  background: var(--bg-alt);
}
.footer-inner {
  max-width: 1280px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 48px;
}
.footer-logo {
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 500;
  display: block;
  margin-bottom: 10px;
}
.footer-tagline {
  font-size: 13px;
  color: var(--text-dim);
  max-width: 280px;
}
.footer-meta { text-align: right; }
.footer-disclaimer {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.6;
  max-width: 480px;
  margin-bottom: 12px;
}
.footer-copy {
  font-size: 11px;
  color: var(--text-muted);
}

/* ---- RESPONSIVE ---- */
@media (max-width: 1024px) {
  .hero { grid-template-columns: 1fr; min-height: auto; }
  .hero-content { padding: 80px 48px 40px; }
  .hero-visual { padding: 0 48px 80px; }
  .hiw-steps { grid-template-columns: 1fr 1fr; gap: 40px; }
  .step-connector { display: none; }
  .diff-inner { grid-template-columns: 1fr; gap: 48px; }
  .perf-inner { grid-template-columns: 1fr; gap: 48px; }
  .hiw, .diff-inner, .perf-inner, .arch, .closing, .footer { padding-left: 48px; padding-right: 48px; }
  .footer-inner { flex-direction: column; }
  .footer-meta { text-align: left; }
}
@media (max-width: 640px) {
  .nav { padding: 0 24px; }
  .hero-content { padding: 72px 24px 40px; }
  .hero-visual { padding: 0 24px 72px; }
  .hiw, .diff-inner, .perf-inner, .arch, .closing, .footer { padding-left: 24px; padding-right: 24px; }
  .hiw-steps { grid-template-columns: 1fr; gap: 32px; }
  .diff-cards { grid-template-columns: 1fr; }
  .arch-img-wrap { height: 280px; }
  .footer { padding: 40px 24px; }
}