/* ═══════════════════════════════════════════════════════════
   MEV Global CSS — officialMEV.org
   Design: Refined institutional — Navy / Gold / White
   Font: Cormorant Garamond (display) + DM Sans (body)
═══════════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:ital,wght@0,300;0,400;0,500;0,600;0,700;1,300;1,400;1,600&family=DM+Sans:ital,opsz,wght@0,9..40,300;0,9..40,400;0,9..40,500;0,9..40,600;0,9..40,700;1,9..40,300;1,9..40,400&family=DM+Mono:wght@300;400;500&display=swap');

/* ── Design Tokens ─────────────────────────────────────── */
:root {
  --navy:        #0D1B3E;
  --navy-deep:   #080F22;
  --navy-mid:    #162448;
  --navy-light:  #1E3060;
  --gold:        #C9A84C;
  --gold-light:  #E0C070;
  --gold-dim:    #9A7A30;
  --steel:       #2E5FA3;
  --steel-light: #4A7DC0;
  --white:       #FFFFFF;
  --off-white:   #F8F7F4;
  --light:       #EAF0FB;
  --gray-100:    #F4F4F4;
  --gray-200:    #E8E8E8;
  --gray-400:    #AAAAAA;
  --gray-600:    #666666;
  --gray-800:    #333333;
  --black:       #111111;
  --meze:        #1A6B3A;
  --red:         #E84142;

  --font-display: 'Cormorant Garamond', Georgia, serif;
  --font-body:    'DM Sans', system-ui, sans-serif;
  --font-mono:    'DM Mono', 'Courier New', monospace;

  --radius-sm:   4px;
  --radius-md:   8px;
  --radius-lg:   16px;
  --radius-xl:   24px;
  --radius-pill: 999px;

  --shadow-sm:   0 2px 8px rgba(13,27,62,0.08);
  --shadow-md:   0 4px 24px rgba(13,27,62,0.12);
  --shadow-lg:   0 8px 48px rgba(13,27,62,0.18);
  --shadow-gold: 0 4px 24px rgba(201,168,76,0.20);

  --transition: 0.25s cubic-bezier(0.4,0,0.2,1);
  --transition-slow: 0.45s cubic-bezier(0.4,0,0.2,1);

  --max-width: 1280px;
  --content-width: 960px;
  --nav-height: 72px;
}

/* ── Reset ─────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 16px; -webkit-font-smoothing: antialiased; }
body { font-family: var(--font-body); background: var(--white); color: var(--black); line-height: 1.6; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, textarea, select { font-family: inherit; }
ul, ol { list-style: none; }

/* ── Typography ────────────────────────────────────────── */
.t-display { font-family: var(--font-display); }
.t-body { font-family: var(--font-body); }
.t-mono { font-family: var(--font-mono); }

/* ── Navigation ────────────────────────────────────────── */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 1000;
  height: var(--nav-height);
  background: rgba(13,27,62,0.97);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(201,168,76,0.15);
  display: flex; align-items: center;
  transition: var(--transition);
}
.nav.scrolled {
  background: rgba(8,15,34,0.99);
  box-shadow: var(--shadow-lg);
}
.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto; padding: 0 32px;
  width: 100%;
  display: flex; align-items: center; justify-content: space-between;
}
.nav-logo {
  display: flex; align-items: center; gap: 12px;
  text-decoration: none;
}
.nav-logo-mark {
  width: 44px; height: 44px;
  object-fit: contain;
  display: block;
  filter: drop-shadow(0 2px 6px rgba(201,168,76,0.35));
  transform-origin: 50% 50%;
}
.nav-logo:hover .nav-logo-mark {
  animation: navLogoSpin 1.2s cubic-bezier(.4,0,.2,1);
}
@keyframes navLogoSpin {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@media (prefers-reduced-motion: reduce) {
  .nav-logo:hover .nav-logo-mark { animation: none; }
}
.nav-logo-text {
  display: flex; flex-direction: column;
}
.nav-logo-primary {
  font-family: var(--font-display);
  font-size: 18px; font-weight: 600; color: var(--white);
  letter-spacing: 0.5px; line-height: 1;
}
.nav-logo-sub {
  font-size: 10px; color: var(--gold); letter-spacing: 2px;
  text-transform: uppercase; font-weight: 500; line-height: 1; margin-top: 2px;
}
.nav-links {
  display: flex; align-items: center; gap: 4px;
}
.nav-link {
  padding: 8px 16px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 500; color: rgba(255,255,255,0.75);
  transition: var(--transition); position: relative;
  text-decoration: none;
}
.nav-link:hover { color: var(--white); background: rgba(255,255,255,0.06); }
.nav-link.active { color: var(--gold); }
.nav-link.active::after {
  content: ''; position: absolute; bottom: 2px; left: 16px; right: 16px;
  height: 2px; background: var(--gold); border-radius: 1px;
}
.nav-dropdown { position: relative; }
.nav-dropdown-menu {
  position: absolute; top: calc(100% + 8px); left: 50%;
  transform: translateX(-50%) translateY(-8px);
  background: var(--navy-deep);
  border: 1px solid rgba(201,168,76,0.2);
  border-radius: var(--radius-md);
  padding: 8px;
  min-width: 200px;
  opacity: 0; pointer-events: none;
  transition: var(--transition);
  box-shadow: var(--shadow-lg);
}
.nav-dropdown:hover .nav-dropdown-menu {
  opacity: 1; pointer-events: all; transform: translateX(-50%) translateY(0);
}
.nav-dropdown-item {
  display: block; padding: 10px 16px; border-radius: var(--radius-sm);
  font-size: 13px; font-weight: 500; color: rgba(255,255,255,0.7);
  transition: var(--transition); text-decoration: none;
}
.nav-dropdown-item:hover { background: rgba(201,168,76,0.1); color: var(--gold); }
.nav-cta {
  padding: 9px 20px; border-radius: var(--radius-sm);
  background: var(--gold); color: var(--navy);
  font-size: 13px; font-weight: 700; letter-spacing: 0.3px;
  transition: var(--transition); text-decoration: none;
}
.nav-cta:hover { background: var(--gold-light); transform: translateY(-1px); box-shadow: var(--shadow-gold); }
.nav-mobile-toggle {
  display: none; flex-direction: column; gap: 5px;
  padding: 8px; cursor: pointer;
}
.nav-mobile-toggle span {
  width: 22px; height: 2px; background: var(--white);
  border-radius: 1px; transition: var(--transition);
}

/* ── Page Wrapper ──────────────────────────────────────── */
.page-wrap { padding-top: var(--nav-height); min-height: 100vh; }

/* ── Section Utilities ─────────────────────────────────── */
.section { padding: 80px 32px; }
.section-sm { padding: 48px 32px; }
.section-lg { padding: 120px 32px; }
.container { max-width: var(--max-width); margin: 0 auto; }
.container-sm { max-width: var(--content-width); margin: 0 auto; }

/* ── Section Headers ───────────────────────────────────── */
.section-eyebrow {
  font-size: 11px; font-weight: 700; letter-spacing: 3px;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 12px; display: block;
}
.section-title {
  font-family: var(--font-display);
  font-size: clamp(32px, 4vw, 52px);
  font-weight: 600; line-height: 1.1;
  color: var(--navy); margin-bottom: 16px;
}
.section-title.light { color: var(--white); }
.section-subtitle {
  font-size: 17px; color: var(--gray-600); line-height: 1.7;
  max-width: 600px;
}
.section-subtitle.light { color: rgba(255,255,255,0.65); }

/* ── Tab / Toggle System ───────────────────────────────── */
.tab-bar {
  display: flex; gap: 4px;
  background: var(--gray-100);
  border-radius: var(--radius-lg);
  padding: 4px;
  width: fit-content;
  margin-bottom: 40px;
}
.tab-btn {
  padding: 10px 24px; border-radius: var(--radius-md);
  font-size: 14px; font-weight: 600; color: var(--gray-600);
  transition: var(--transition); cursor: pointer; border: none;
  background: transparent; white-space: nowrap;
}
.tab-btn.active {
  background: var(--navy); color: var(--white);
  box-shadow: var(--shadow-sm);
}
.tab-btn:hover:not(.active) { color: var(--navy); background: var(--gray-200); }
.tab-panel { display: none; }
.tab-panel.active { display: block; animation: fadeIn 0.3s ease; }

/* Dark tab bar variant */
.tab-bar.dark {
  background: rgba(255,255,255,0.08);
}
.tab-bar.dark .tab-btn { color: rgba(255,255,255,0.55); }
.tab-bar.dark .tab-btn.active { background: var(--gold); color: var(--navy); }
.tab-bar.dark .tab-btn:hover:not(.active) { color: var(--white); background: rgba(255,255,255,0.1); }

/* Gold accent tab variant */
.tab-bar.gold-accent { background: rgba(201,168,76,0.08); }
.tab-bar.gold-accent .tab-btn { color: var(--gray-600); }
.tab-bar.gold-accent .tab-btn.active { background: var(--gold); color: var(--navy); }

/* ── Buttons ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 28px; border-radius: var(--radius-sm);
  font-size: 14px; font-weight: 600; letter-spacing: 0.3px;
  transition: var(--transition); cursor: pointer; border: none;
  text-decoration: none; white-space: nowrap;
}
.btn-primary {
  background: var(--gold); color: var(--navy);
}
.btn-primary:hover { background: var(--gold-light); transform: translateY(-2px); box-shadow: var(--shadow-gold); }
.btn-navy {
  background: var(--navy); color: var(--white);
}
.btn-navy:hover { background: var(--navy-light); transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-outline {
  background: transparent; color: var(--navy);
  border: 1.5px solid var(--navy);
}
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-outline-gold {
  background: transparent; color: var(--gold);
  border: 1.5px solid var(--gold);
}
.btn-outline-gold:hover { background: var(--gold); color: var(--navy); }
.btn-outline-white {
  background: transparent; color: var(--white);
  border: 1.5px solid rgba(255,255,255,0.4);
}
.btn-outline-white:hover { background: rgba(255,255,255,0.1); border-color: var(--white); }
.btn-sm { padding: 8px 18px; font-size: 13px; }
.btn-lg { padding: 16px 40px; font-size: 16px; }
.btn-consult {
  background: linear-gradient(135deg, var(--gold), var(--gold-dim));
  color: var(--navy); font-weight: 700;
}
.btn-consult:hover { transform: translateY(-2px); box-shadow: var(--shadow-gold); }

/* ── Cards ─────────────────────────────────────────────── */
.card {
  background: var(--white);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-lg);
  padding: 32px;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}
.card:hover { box-shadow: var(--shadow-md); transform: translateY(-2px); border-color: var(--gray-400); }
.card-navy {
  background: var(--navy); border-color: var(--navy-light);
  color: var(--white);
}
.card-gold-border {
  border-left: 4px solid var(--gold);
}

/* ── Badge ─────────────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 4px 10px; border-radius: var(--radius-pill);
  font-size: 11px; font-weight: 700; letter-spacing: 1px;
  text-transform: uppercase;
}
.badge-gold { background: rgba(201,168,76,0.12); color: var(--gold-dim); border: 1px solid rgba(201,168,76,0.25); }
.badge-navy { background: rgba(13,27,62,0.08); color: var(--navy); border: 1px solid rgba(13,27,62,0.15); }
.badge-green { background: rgba(26,107,58,0.1); color: var(--meze); border: 1px solid rgba(26,107,58,0.2); }
.badge-white { background: rgba(255,255,255,0.12); color: var(--white); border: 1px solid rgba(255,255,255,0.2); }

/* ── Forms ─────────────────────────────────────────────── */
.form-group { margin-bottom: 20px; }
/* Honeypot — visually hidden anti-spam field. Real users never see or focus this; bots auto-fill it. */
.form-honeypot { position: absolute !important; left: -9999px !important; width: 1px !important; height: 1px !important; opacity: 0 !important; pointer-events: none !important; }
.form-label {
  display: block; font-size: 13px; font-weight: 600;
  color: var(--gray-800); margin-bottom: 6px; letter-spacing: 0.3px;
}
.form-label.light { color: rgba(255,255,255,0.8); }
.form-input, .form-textarea, .form-select {
  width: 100%; padding: 12px 16px;
  border: 1.5px solid var(--gray-200); border-radius: var(--radius-sm);
  font-size: 15px; color: var(--black); background: var(--white);
  transition: var(--transition); outline: none;
}
.form-input:focus, .form-textarea:focus, .form-select:focus {
  border-color: var(--navy); box-shadow: 0 0 0 3px rgba(13,27,62,0.08);
}
.form-textarea { resize: vertical; min-height: 120px; }
.form-input.dark, .form-textarea.dark {
  background: rgba(255,255,255,0.06); border-color: rgba(255,255,255,0.15);
  color: var(--white);
}
.form-input.dark:focus, .form-textarea.dark:focus {
  border-color: var(--gold); box-shadow: 0 0 0 3px rgba(201,168,76,0.15);
}
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-success {
  padding: 16px; border-radius: var(--radius-sm);
  background: rgba(26,107,58,0.1); color: var(--meze);
  border: 1px solid rgba(26,107,58,0.2);
  font-size: 14px; font-weight: 500;
  display: none;
}
.form-error {
  padding: 16px; border-radius: var(--radius-sm);
  background: rgba(232,65,66,0.08); color: var(--red);
  border: 1px solid rgba(232,65,66,0.2);
  font-size: 14px; display: none;
}

/* ── Animated Connected-Nodes Background ──────────────── */
.mev-nodes-canvas {
  position: absolute; inset: 0;
  width: 100%; height: 100%;
  pointer-events: none;
  z-index: 0;
  display: block;
}
/* Ensure section content sits above the node canvas */
.papers-header > *:not(.mev-nodes-canvas),
.wp-hero       > *:not(.mev-nodes-canvas),
.cta-section   > *:not(.mev-nodes-canvas) {
  position: relative; z-index: 1;
}

/* ── Social Links ──────────────────────────────────────── */
.social-links { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.social-link {
  width: 36px; height: 36px; border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  background: var(--gray-100); color: var(--gray-600);
  transition: var(--transition); font-size: 15px;
  text-decoration: none; border: 1px solid transparent;
}
.social-link:hover { background: var(--navy); color: var(--white); transform: translateY(-2px); }
.social-link.li:hover { background: #0A66C2; }
.social-link.tw:hover { background: #000; }
.social-link.wa:hover { background: #25D366; }
.social-link.fb:hover { background: #1877F2; }
.social-link.ig:hover { background: linear-gradient(135deg,#f09433,#e6683c,#dc2743,#cc2366,#bc1888); }
.social-link.tt:hover { background: #000; }
.social-link.tg:hover { background: #229ED9; }
.social-link.yt:hover { background: #FF0000; }
.social-link.web:hover { background: var(--navy); }
.social-link-light {
  background: rgba(255,255,255,0.1); color: rgba(255,255,255,0.6);
  border-color: rgba(255,255,255,0.1);
}
.social-link-light:hover { background: var(--gold); color: var(--navy); }

/* ── Progress Tracker ──────────────────────────────────── */
.progress-tracker { display: flex; flex-direction: column; gap: 8px; margin-top: 16px; }
.progress-item { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.progress-dot {
  width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0;
}
.progress-dot.done { background: var(--meze); }
.progress-dot.partial { background: var(--gold); }
.progress-dot.pending { background: var(--gray-200); border: 1.5px solid var(--gray-400); }
.progress-label { color: var(--gray-600); }
.progress-label.done { color: var(--gray-800); }

/* ── Footer ────────────────────────────────────────────── */
.footer {
  background: var(--navy-deep);
  padding: 64px 32px 32px;
  color: rgba(255,255,255,0.6);
}
.footer-grid {
  max-width: var(--max-width); margin: 0 auto;
  display: grid; grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 48px; margin-bottom: 48px;
}
.footer-brand-name {
  font-family: var(--font-display);
  font-size: 22px; font-weight: 600; color: var(--white);
  margin-bottom: 8px;
}
.footer-brand-sub {
  font-size: 11px; letter-spacing: 2px; text-transform: uppercase;
  color: var(--gold); margin-bottom: 16px;
}
.footer-brand-desc { font-size: 14px; line-height: 1.7; max-width: 280px; }
.footer-col-title {
  font-size: 12px; font-weight: 700; letter-spacing: 2px;
  text-transform: uppercase; color: var(--gold);
  margin-bottom: 16px;
}
.footer-link {
  display: block; font-size: 14px; color: rgba(255,255,255,0.55);
  margin-bottom: 10px; transition: var(--transition); text-decoration: none;
}
.footer-link:hover { color: var(--white); transform: translateX(4px); }
.footer-bottom {
  max-width: var(--max-width); margin: 0 auto;
  padding-top: 24px; border-top: 1px solid rgba(255,255,255,0.08);
  display: flex; align-items: center; justify-content: space-between;
  font-size: 13px;
}
.footer-mev-stamp {
  font-family: var(--font-display);
  color: var(--gold); font-style: italic; font-size: 14px;
}
.footer-credit {
  max-width: var(--max-width); margin: 0 auto;
  padding-top: 14px; margin-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.05);
  text-align: center;
  font-size: 12px; letter-spacing: 0.4px;
  color: rgba(255,255,255,0.35);
}
.footer-credit a {
  color: rgba(255,255,255,0.6);
  text-decoration: none;
  border-bottom: 1px dotted rgba(255,255,255,0.25);
  transition: color 0.2s, border-color 0.2s;
}
.footer-credit a:hover {
  color: var(--gold);
  border-bottom-color: var(--gold);
}

/* ── Dividers ──────────────────────────────────────────── */
.gold-line {
  width: 48px; height: 3px; background: var(--gold);
  border-radius: 2px; margin-bottom: 24px;
}
.gold-line.center { margin-left: auto; margin-right: auto; }

/* ── Scroll animations ─────────────────────────────────── */
.reveal {
  opacity: 0; transform: translateY(24px);
  transition: opacity 0.6s ease, transform 0.6s ease;
}
.reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }
.reveal-delay-3 { transition-delay: 0.3s; }
.reveal-delay-4 { transition-delay: 0.4s; }

/* ── Keyframes ─────────────────────────────────────────── */
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes shimmer { from { background-position: -200% center; } to { background-position: 200% center; } }
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.5; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }

/* ── Loader ────────────────────────────────────────────── */
.spinner {
  width: 20px; height: 20px;
  border: 2px solid rgba(255,255,255,0.3);
  border-top-color: var(--white);
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}

/* ── Responsive ────────────────────────────────────────── */
@media (max-width: 1024px) {
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 768px) {
  :root { --nav-height: 64px; }
  .section { padding: 56px 20px; }
  .section-lg { padding: 80px 20px; }
  .nav-links { display: none; }
  .nav-mobile-toggle { display: flex; }
  .footer-grid { grid-template-columns: 1fr; gap: 28px; }
  .footer-bottom { flex-direction: column; gap: 12px; text-align: center; }
  .tab-bar { width: 100%; overflow-x: auto; }
}
@media (max-width: 480px) {
  .section { padding: 40px 16px; }
  .btn { padding: 10px 20px; }
  .card { padding: 20px; }
}
