:root {
  --sundex-page-bg: #04070c;
  --sundex-page-ink: #f2f5f9;
  --sundex-page-muted: #8d98a8;
  --sundex-page-ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --sundex-page-ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
}

html {
  min-height: 100%;
  background: var(--sundex-page-bg) !important;
  scroll-behavior: auto;
}

body.sundex-route-recovering {
  min-height: 100vh;
  background: var(--sundex-page-bg) !important;
}

body.sundex-route-recovering #root {
  visibility: hidden !important;
  opacity: 0 !important;
}

body.sundex-route-away #sundex-motion-intro,
body.sundex-route-away #sundex-market-explorer,
body.sundex-route-away #sundex-card-story,
body.sundex-route-away #sundex-trade-stage,
body.sundex-route-away #sundex-wallet-stage,
body.sundex-route-away #sundex-security-stage,
body.sundex-route-away #sundex-final-cta {
  display: none !important;
}

body.sundex-premium-landing {
  min-height: 100vh;
  background: var(--sundex-page-bg) !important;
  color: var(--sundex-page-ink);
}

body.sundex-premium-landing #sundex-cinematic-network,
body.sundex-premium-landing #root .exchange-hero,
body.sundex-premium-landing #root .exchange-tape,
body.sundex-premium-landing #root .exchange-market-section,
body.sundex-premium-landing #root .exchange-products,
body.sundex-premium-landing #root .exchange-safety,
body.sundex-premium-landing #root .exchange-final-cta,
body.sundex-premium-landing #root .exchange-header {
  display: none !important;
}

body.sundex-premium-landing #root {
  min-height: 0 !important;
  background: var(--sundex-page-bg) !important;
}

body.sundex-premium-landing #root > .exchange-landing {
  min-height: 0 !important;
  background: var(--sundex-page-bg) !important;
  color: var(--sundex-page-ink) !important;
}

body.sundex-premium-landing #root > main {
  display: none !important;
}

body.sundex-premium-landing #root .exchange-footer {
  background: var(--sundex-page-bg) !important;
}

body.sundex-premium-landing .smi-nav {
  z-index: 200 !important;
}

body.sundex-premium-landing .smi-nav::before {
  background: linear-gradient(180deg, rgba(4, 7, 12, 0.74), rgba(4, 7, 12, 0.42)) !important;
  border-bottom-color: rgba(188, 202, 221, 0.12) !important;
  box-shadow: 0 18px 54px rgba(0, 0, 0, 0.2) !important;
  backdrop-filter: blur(22px) saturate(128%) !important;
  -webkit-backdrop-filter: blur(22px) saturate(128%) !important;
}

body.sundex-premium-landing .smi-logo img,
body.sundex-premium-landing .smi-brand img,
body.sundex-premium-landing .sundex-white-loading-logo {
  filter: grayscale(1) brightness(3.4) contrast(1.38) !important;
}

body.sundex-premium-landing .smi-nav-pill a {
  transition:
    color 180ms ease,
    background-color 180ms ease,
    box-shadow 180ms ease,
    transform 160ms var(--sundex-page-ease-out) !important;
}

body.sundex-premium-landing .smi-nav-pill a:active {
  transform: scale(0.97);
}

body.sundex-premium-landing .smi-nav-pill a.is-active {
  background:
    radial-gradient(ellipse 120% 92% at 50% -32%, #ffffff 0%, transparent 58%),
    linear-gradient(180deg, #edf1f6, #a9b2bf) !important;
  color: #10141b !important;
}

body.sundex-premium-landing .sundex-market-explorer.sme-gallery-v6 {
  min-height: max(760px, 100dvh) !important;
}

body.sundex-premium-landing .sme-gallery-v6 .smg-shell {
  min-height: max(760px, 100dvh) !important;
}

body.sundex-premium-landing .sme-gallery-v6 .smg-card-surface {
  box-shadow:
    0 34px 86px rgba(0, 0, 0, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.075),
    inset 0 -1px 0 rgba(0, 0, 0, 0.62) !important;
}

body.sundex-premium-landing .sme-gallery-v6 .smg-card-foot > a,
body.sundex-premium-landing .sme-gallery-v6 .smg-arrow,
body.sundex-premium-landing .smi-button,
body.sundex-premium-landing .sundex-support-trigger {
  transition:
    transform 150ms var(--sundex-page-ease-out),
    color 180ms ease,
    filter 180ms ease,
    box-shadow 220ms ease !important;
}

body.sundex-premium-landing .sme-gallery-v6 .smg-card-foot > a:active,
body.sundex-premium-landing .sme-gallery-v6 .smg-arrow:active,
body.sundex-premium-landing .smi-button:active,
body.sundex-premium-landing .sundex-support-trigger:active {
  transform: scale(0.97) !important;
}

body.sundex-premium-landing .sundex-support-trigger {
  right: max(18px, env(safe-area-inset-right)) !important;
  bottom: max(18px, env(safe-area-inset-bottom)) !important;
}

@media (max-width: 767px) {
  body.sundex-premium-landing .sundex-market-explorer.sme-gallery-v6,
  body.sundex-premium-landing .sme-gallery-v6 .smg-shell {
    min-height: 900px !important;
  }

  body.sundex-premium-landing .sme-gallery-v6 .smg-shell {
    grid-template-rows: auto minmax(500px, 1fr) !important;
    padding-bottom: 28px !important;
  }

  body.sundex-premium-landing .sme-gallery-v6 .smg-gallery {
    grid-template-rows: 442px 54px !important;
  }

  body.sundex-premium-landing .sme-gallery-v6 .smg-stage {
    min-height: 442px !important;
    height: 442px !important;
  }

  body.sundex-premium-landing .sme-gallery-v6 .smg-search input {
    font-size: 16px !important;
  }
}

@media (hover: hover) and (pointer: fine) {
  body.sundex-premium-landing .smi-nav-pill a:hover {
    transform: translateY(-1px);
  }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  body.sundex-premium-landing *,
  body.sundex-premium-landing *::before,
  body.sundex-premium-landing *::after {
    scroll-behavior: auto !important;
  }
}

/* Flagship landing finish: readable market controls and a complete first mobile viewport. */
body.sundex-premium-landing .sme-cinema-v7 .smc-search input {
  color: rgba(247, 249, 252, 0.96) !important;
  font-size: 0.8rem !important;
}

body.sundex-premium-landing .sme-cinema-v7 .smc-search input::placeholder {
  color: rgba(226, 233, 243, 0.62) !important;
}

body.sundex-premium-landing .sme-cinema-v7 .smc-asset-rail strong {
  font-size: 0.69rem !important;
}

body.sundex-premium-landing .sme-cinema-v7 .smc-asset-rail small {
  color: rgba(222, 230, 240, 0.52) !important;
  font-size: 0.57rem !important;
}

body.sundex-premium-landing .sme-cinema-v7 .smc-nav-actions > span,
body.sundex-premium-landing .sme-cinema-v7 .smc-range > span {
  color: rgba(222, 230, 240, 0.55) !important;
}

@media (max-width: 767px) {
  body.sundex-premium-landing .sundex-motion-intro,
  body.sundex-premium-landing .smi-stage,
  body.sundex-premium-landing .smi-hero {
    height: 100svh !important;
    min-height: 660px !important;
    max-height: 100svh !important;
  }

  body.sundex-premium-landing .smi-hero-content {
    top: 0 !important;
    bottom: auto !important;
    display: flex !important;
    height: 100svh !important;
    min-height: 660px !important;
    max-height: 100svh !important;
    flex-direction: column !important;
    justify-content: flex-end !important;
    gap: 14px !important;
    padding: 86px 18px max(22px, env(safe-area-inset-bottom)) !important;
    pointer-events: none;
  }

  body.sundex-premium-landing .smi-hero-primary,
  body.sundex-premium-landing .smi-actions,
  body.sundex-premium-landing .smi-hero-description {
    pointer-events: auto;
  }

  body.sundex-premium-landing .smi-hero h1 {
    max-width: 9.6ch;
    margin-bottom: 17px !important;
    font-size: clamp(2.2rem, 10.6vw, 3.25rem) !important;
    line-height: 0.96 !important;
  }

  body.sundex-premium-landing .smi-actions {
    gap: 8px !important;
  }

  body.sundex-premium-landing .smi-actions .smi-button {
    min-height: 43px !important;
    padding-inline: 12px !important;
    font-size: 0.74rem !important;
  }

  body.sundex-premium-landing .smi-hero-description {
    max-width: 36ch !important;
    color: rgba(255, 255, 255, 0.82) !important;
    font-size: 0.82rem !important;
    line-height: 1.48 !important;
  }

  body.sundex-premium-landing .smi-bottom-gradient {
    height: 62svh !important;
    background: linear-gradient(to top, #0a0b11 0%, rgba(10, 11, 17, 0.9) 38%, rgba(10, 11, 17, 0.28) 73%, transparent 100%) !important;
  }

  body.sundex-premium-landing .smi-hero-image {
    background-position: 53% 31% !important;
  }

  /* Support remains available from the mobile menu without obscuring product UI. */
  body.sundex-premium-landing .sundex-support-trigger,
  body.sundex-premium-landing .smp-chat {
    display: none !important;
  }

  body.sundex-premium-landing .sundex-mobile-support-link {
    color: rgba(232, 238, 246, 0.72) !important;
  }
}
