/* ============================================================
   Header — Modern Refresh
   ============================================================ */

header {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0px 32px;
  background: rgba(8, 8, 8, 0.72);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: background .2s ease, border-color .2s ease;
}

.logo-img {
  height: 100px;
  width: 220px;
  object-fit: fill;
  transition: transform .2s ease;
}
.logo-img:hover { transform: scale(1.03); }

header nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

header nav ul.menu {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}

header nav ul.menu > li > a,
.dropdown-btn,
.lang-btn {
  position: relative;
  color: var(--text-secondary);
  text-decoration: none;
  background: none;
  border: none;
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  letter-spacing: .1px;
  display: flex;
  align-items: center;
  gap: 5px;
  cursor: pointer;
  padding: 8px 2px;
  transition: color .18s ease;
}

/* subtle animated underline on hover */
header nav ul.menu > li > a::after,
.dropdown-btn::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 2px;
  width: 0;
  height: 1.5px;
  background: var(--lavender);
  transition: width .2s ease;
}
header nav ul.menu > li > a:hover::after,
.dropdown-btn:hover::after,
.dropdown.active > .dropdown-btn::after { width: 100%; }

header nav ul.menu > li > a:hover,
.dropdown-btn:hover,
.lang-btn:hover,
.dropdown.active > .dropdown-btn { color: var(--text); }

.chevron {
  flex-shrink: 0;
  color: var(--text-muted);
  transition: transform .3s cubic-bezier(.4,0,.2,1), color .18s ease;
}
.dropdown-btn:hover .chevron { color: var(--text-secondary); }
.dropdown.active .chevron,
.lang-selector.active .chevron { transform: rotate(180deg); }

/* ============================================================
   Mega dropdown (Trading menu)
   ============================================================ */

.dropdown-mega-menu {
  min-width: 300px;
  padding: 8px;
  left: 0;
  transform-origin: top left;
}

.dropdown-mega-head {
  display: block;
  width: 100%;
  padding: 8px 10px 12px;
  margin-bottom: 4px;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}

.dropdown-mega-label {
  display: block;
  width: 100%;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1.4px;
  color: var(--lavender);
  white-space: nowrap;
}

.dropdown-mega-grid {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.dropdown-mega-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  transition: background .15s ease, transform .15s ease;
}
.dropdown-mega-item:hover {
  background: var(--surface-3);
  transform: translateX(2px);
}

.dropdown-mega-icon {
  flex-shrink: 0;
  width: 28px;
  height: 28px;
  border-radius: var(--radius-sm);
  background: rgba(167, 139, 250, 0.08);
  border: 1px solid rgba(167, 139, 250, 0.18);
  color: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  transition: background .15s ease, border-color .15s ease;
}
.dropdown-mega-item:hover .dropdown-mega-icon {
  background: rgba(167, 139, 250, 0.16);
  border-color: rgba(167, 139, 250, 0.32);
}

.dropdown-mega-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.dropdown-mega-text strong {
  font-size: 13px;
  font-weight: 500;
  color: var(--text);
}
.dropdown-mega-text small {
  font-size: 11px;
  color: var(--text-muted);
  line-height: 1.3;
}

/* ============================================================
   Dropdown (desktop) — shared open/close animation
   ============================================================ */

.dropdown { position: relative; }

.dropdown-menu {
  position: absolute;
  top: calc(100% + 12px);
  left: 0;
  min-width: 210px;
  background: rgba(14, 14, 14, 0.96);
  backdrop-filter: blur(10px);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 16px 40px rgba(0,0,0,.45), 0 2px 8px rgba(0,0,0,.3);
  padding: 6px;
  list-style: none;
  z-index: 100;

  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px) scale(.98);
  transition: opacity .18s ease, transform .18s cubic-bezier(.4,0,.2,1), visibility .18s;
}

.dropdown.active > .dropdown-menu,
.dropdown:hover > .dropdown-menu,
.dropdown.active > .dropdown-mega-menu,
.dropdown:hover > .dropdown-mega-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

.dropdown-menu li a {
  display: block;
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  font-size: 13.5px;
  color: var(--text-secondary);
  text-decoration: none;
  transition: background .15s ease, color .15s ease, padding-left .15s ease;
}
.dropdown-menu li a:hover {
  background: var(--surface-3);
  color: var(--text);
  padding-left: 18px;
}

.lang-selector { position: relative; }
.lang-flag {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .5px;
  color: var(--text-secondary);
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  padding: 4px 8px;
  transition: border-color .15s ease, color .15s ease;
}
.lang-flag:hover { border-color: var(--lavender); color: var(--text); }

/* ============================================================
   Product tabs — segmented pill control
   ============================================================ */

.product-tabs {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 3px;
}

.product-tab {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-secondary);
  cursor: pointer;
  white-space: nowrap;
  transition: background .2s ease, color .2s ease, box-shadow .2s ease;
}

.product-tab:hover:not(.tab-disabled):not(.tab-active) {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.product-tab.tab-active {
  background: var(--lavender);
  color: var(--text-on-accent);
  box-shadow: 0 2px 10px rgba(167, 139, 250, 0.35);
}

.product-tab.tab-disabled {
  color: var(--text-muted);
  opacity: .55;
  cursor: default;
  pointer-events: none;
}

.tab-soon {
  order: -1;
  background: none;
  color: var(--lavender);
  font-size: 8px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 0;
  line-height: 0.5;
}

/* ============================================================
   Login / CTA button
   ============================================================ */

.hero-buttons a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--lavender);
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 14px;
  padding: 4px 22px;
  border-radius: var(--radius-sm);
  transition: background .18s ease, transform .18s ease, box-shadow .18s ease;
}
.hero-buttons a:hover {
  background: var(--lavender-strong);
  color: var(--text-on-accent);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(167, 139, 250, 0.3);
}
.hero-buttons a:active { transform: translateY(0); }

/* ============================================================
   Hamburger toggle
   ============================================================ */

.hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  cursor: pointer;
  background: none;
  border: none;
  padding: 8px;
  position: relative;
  z-index: 1002;
}
.hamburger span {
  width: 22px;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform .25s ease, opacity .2s ease;
}
.hamburger.active span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ============================================================
   Mobile nav overlay + drawer
   ============================================================ */

.nav-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(2px);
  z-index: 999;
  opacity: 0;
  transition: opacity .25s ease;
}
.nav-overlay.active {
  display: block;
  opacity: 1;
}

@media (max-width: 768px) {
  header { padding: 12px 20px; overflow: visible; left: 0; right: 0; }
  .hamburger { display: flex; }
  .product-tabs { display: none; }

  header nav {
    position: fixed;
    top: 0; right: 0;
    height: 100vh;
    height: 100dvh;
    width: 300px;
    max-width: 84vw;
    background: rgba(10, 10, 10, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid var(--border);
    padding: 88px 22px 28px;
    transform: translateX(100%);
    visibility: hidden;
    transition: transform .3s cubic-bezier(.4,0,.2,1), visibility .3s;
    z-index: 1001;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    flex-direction: column;
    align-items: stretch;
    gap: 4px;
    box-shadow: -12px 0 40px rgba(0,0,0,.4);
  }
  header nav.active { transform: translateX(0); visibility: visible; }

  header nav ul.menu {
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
  }
  header nav ul.menu > li { width: 100%; }
  header nav ul.menu > li > a { padding: 12px 4px; font-size: 15px; }

  .dropdown-btn { width: 100%; justify-content: space-between; padding: 12px 4px; font-size: 15px; }

  .dropdown.active > .dropdown-btn {
    color: var(--lavender);
  }

  .dropdown-menu,
  .dropdown-mega-menu {
    position: static;
    transform: none !important;
    opacity: 1;
    visibility: visible;
    display: grid;
    grid-template-rows: 0fr;
    box-shadow: none;
    width: 100%;
    border: none;
    background: transparent;
    backdrop-filter: none;
    padding: 0 0 0 12px;
    min-width: 0;
    transition: grid-template-rows .25s ease, padding .25s ease;
  }
  .dropdown-menu > *,
  .dropdown-mega-menu > * { overflow: hidden; }

  .dropdown.active .dropdown-menu,
  .dropdown.active .dropdown-mega-menu {
    grid-template-rows: 1fr;
    padding: 2px 0 10px 12px;
  }

  .dropdown-mega-head { padding-left: 0; border-color: var(--border); }
  .dropdown-mega-item { padding: 10px 8px; }

  .dropdown-menu li a {
    padding: 11px 12px;
    border-left: 2px solid transparent;
    font-size: 14px;
    color: var(--text-secondary);
  }
  .dropdown-menu li a:hover {
    background: rgba(255, 255, 255, 0.05);
    border-left-color: var(--lavender);
    color: var(--text);
    padding-left: 12px;
  }

  .hero-buttons { margin-top: 16px; }
  .hero-buttons a { width: 100%; justify-content: center; }
}

body.nav-open { overflow: hidden; }

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

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
  padding: 0 24px 0;
}

.footer-container {
  max-width: var(--container);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 44px;
  padding: 18px 0 0;
}

.footer-brand-full {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--border);
}

.footer-brand-left {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.footer-brand-left .footer-logo {
  height: 90px;
  margin-bottom: 0;
}

.footer-brand-left .footer-tagline {
  margin-bottom: 0;
  max-width: 460px;
  padding-left: 46px;
}

.footer-brand-right {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  padding-right: 46px;
}


.footer-logo { height: 100px; margin-bottom: 0; }

.footer-tagline {
  font-size: 11.5px;
  color: var(--text-secondary);
  margin-bottom: 18px;
  line-height: 1.65;
}

.footer-cta {
  display: block;
  background: var(--lavender);
  color: var(--text-on-accent);
  font-weight: 600;
  font-size: 13.5px;
  padding: 10px 20px;
  border-radius: var(--radius-sm);
  margin-bottom: 0;
  text-align: center;
  transition: background .15s ease, transform .15s ease;
}
.footer-cta:hover {
  background: var(--lavender-strong);
  color: var(--text-on-accent);
  transform: translateY(-1px);
}

.footer-social { display: flex; gap: 10px; justify-content: space-between; }
.footer-social a {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  font-size: 13px;
  transition: border-color .15s ease, color .15s ease, transform .15s ease;
}
.footer-social a:hover {
  border-color: var(--text-secondary);
  color: var(--text);
  transform: translateY(-2px);
}

/* ============================================================
   Row 2 — 4 link columns
   ============================================================ */

.footer-cols {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 36px 24px;
}

.footer-col h4 {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 20px;
  padding-bottom: 10px;
}
.footer-col h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-secondary);
}

.footer-col ul { list-style: none; }
.footer-col ul li {
  margin-bottom: 11px;
  font-size: 13.5px;
  line-height: 1.5;
}
.footer-col ul li a {
  color: var(--text-secondary);
  font-size: 13.5px;
  transition: color .15s ease;
}
.footer-col ul li a:hover { color: var(--text); }
.footer-global-full {
  border-top: 1px solid var(--border);
  padding-top: 32px;
}
.footer-global-full h4 {
  position: relative;
  font-size: 15px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 18px;
  padding-bottom: 10px;
}
.footer-global-full h4::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 26px;
  height: 2px;
  border-radius: 2px;
  background: var(--text-secondary);
}

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

.office-card {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  background: none !important;
  border: none !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.office-icon {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: var(--lavender);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.office-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.office-text strong {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--text);
  line-height: 1.3;
}

.office-text p {
  font-size: 13px;
  color: var(--text-secondary);
  line-height: 1.5;
  margin: 0;
}

.office-text p a {
  color: var(--text-secondary);
  transition: color .15s ease;
}
.office-text p a:hover { color: var(--text); }

/* ============================================================
   Bottom bar — copyright + legal links
   ============================================================ */

.footer-bottom {
  max-width: var(--container);
  width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0;
  border-top: 1px solid var(--border);
}
.footer-bottom p { font-size: 12.5px;
  color: var(--text-muted); margin: 0; padding: 18px 0; }

.legal-titles {
  display: flex;
  gap: 24px;
  flex-wrap: wrap;
  justify-content: flex-end;
  padding: 18px 0;
}
.legal-titles .legal-title {
  font-size: 13px;
  font-weight: 600;
  margin: 0;
}
.legal-titles a {
  color: var(--text-secondary);
  transition: color .15s ease;
}
.legal-titles a:hover { color: var(--text); }

.partner-slider { overflow: hidden; max-width: 420px; }
.partner-track {
  display: flex;
  gap: 30px;
  align-items: center;
}
.partner-track img { height: 22px; opacity: .5; filter: grayscale(1) brightness(2); }

/* ============================================================
   Footer — responsive
   ============================================================ */

@media (max-width: 1024px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }
  .office-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-right { padding-right: 0; }
}

@media (max-width: 768px) {
  .footer-cols { grid-template-columns: 1fr 1fr; }

  .office-grid { grid-template-columns: 1fr; gap: 18px; }

  .footer-brand-full {
    display: flex;
    flex-direction: column;
    gap: 24px;
  }
  .footer-brand-left { align-items: center; text-align: center; }
  .footer-brand-left .footer-tagline { padding-left: 0; max-width: 100%; }
  .footer-brand-right {
    align-items: center;
    padding-right: 0;
    width: 100%;
  }
  .footer-social { justify-content: center; gap: 14px; }
  .footer-cta { max-width: 280px; }

  .footer-bottom {
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 12px;
  }
  .legal-titles { justify-content: center; }
}

@media (max-width: 500px) {
  .footer-cols { grid-template-columns: 1fr; text-align: center; }
  .footer-col h4::after,
  .footer-global-full h4::after { left: 50%; transform: translateX(-50%); }
  .footer-col h4,
  .footer-global-full h4 { text-align: center; }

  .footer-brand-full { text-align: center; justify-items: center; }
  .footer-brand-full .footer-logo { justify-self: center; }
  .footer-brand-full .footer-cta { justify-self: center; }
  .footer-brand-full .footer-social { justify-self: center; }

  .office-card { flex-direction: column; align-items: center; text-align: center; }

  .footer-bottom { flex-direction: column; align-items: center; gap: 10px; }
  .legal-titles { justify-content: center; gap: 16px; }
  .legal-titles .legal-title { font-size: 12px; }
}

/* ============================================================
   Back to top
   ============================================================ */

.back-to-top {
  position: fixed;
  right: 24px;
  bottom: 24px;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--text);
  color: var(--bg);
  border: none;
  font-size: 18px;
  cursor: pointer;
  z-index: 900;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.4);

  /* hidden by default */
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity .25s ease, transform .25s ease, visibility .25s ease, background .15s ease;
}

.back-to-top.visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.back-to-top:hover { background: var(--text-secondary); }