:root {
  color-scheme: dark;
  --bg: #070b10;
  --bg-elevated: #0c1219;
  --panel: rgba(14, 22, 32, 0.72);
  --panel-border: rgba(94, 234, 212, 0.12);
  --text: #e8eef7;
  --muted: #8fa3bd;
  --cyan: #5eead4;
  --cyan-dim: rgba(94, 234, 212, 0.15);
  --gold: #d4af37;
  --gold-soft: #f4dbb4;
  --danger: #f87171;
  --up: #34d399;
  --down: #f87171;
  --font: "DM Sans", system-ui, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --max: 1200px;
  --nav-h: 64px;
}

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

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  min-height: 100vh;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    radial-gradient(ellipse 80% 50% at 20% -10%, rgba(34, 211, 238, 0.12), transparent 55%),
    radial-gradient(ellipse 60% 40% at 90% 10%, rgba(212, 175, 55, 0.08), transparent 50%),
    radial-gradient(ellipse 50% 30% at 50% 100%, rgba(94, 234, 212, 0.06), transparent 60%);
  z-index: 0;
}

a {
  color: var(--cyan);
  text-decoration: none;
}

a:hover {
  text-decoration: underline;
}

.wrap {
  position: relative;
  z-index: 1;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 20px;
}

/* Nav */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(7, 11, 16, 0.85);
  backdrop-filter: blur(12px);
}

.site-nav .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  gap: 16px;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text);
  text-decoration: none;
}

.brand:hover {
  text-decoration: none;
}

.brand-logo {
  display: block;
  height: 32px;
  width: auto;
  max-width: min(200px, 42vw);
}

.brand-logo--icon {
  height: 28px;
  max-width: none;
}

/* Legacy placeholder (если где-то остался span) */
.brand-mark {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--cyan), #0ea5e9 55%, var(--gold));
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.35);
}

.nav-links {
  display: none;
  align-items: center;
  gap: 4px;
}

@media (min-width: 900px) {
  .nav-links {
    display: flex;
  }
}

.nav-links a {
  padding: 8px 12px;
  border-radius: 8px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none;
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--text);
  background: var(--cyan-dim);
  text-decoration: none;
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  border: none;
  cursor: pointer;
  text-decoration: none;
  transition: transform 0.15s, box-shadow 0.15s;
}

.btn:hover {
  text-decoration: none;
  transform: translateY(-1px);
}

.btn-primary {
  background: linear-gradient(135deg, #2dd4bf, #0ea5e9);
  color: #042f2e;
  box-shadow: 0 4px 24px rgba(45, 212, 191, 0.25);
}

.btn-ghost {
  background: transparent;
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.12);
}

.btn-gold {
  background: linear-gradient(135deg, var(--gold-soft), var(--gold));
  color: #1a1408;
}

/* Ticker */
.ticker {
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(0, 0, 0, 0.25);
  overflow: hidden;
}

.ticker-track {
  display: flex;
  padding: 10px 0;
  animation: ticker-scroll 40s linear infinite;
  width: max-content;
}

.ticker-run {
  display: flex;
  align-items: center;
  width: max-content;
}

.ticker-item {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 0.82rem;
  white-space: nowrap;
  margin-right: 32px;
}

.ticker-item strong {
  font-family: var(--mono);
  font-weight: 600;
}

.ticker-item .chg-up {
  color: var(--up);
}

.ticker-item .chg-down {
  color: var(--down);
}

@keyframes ticker-scroll {
  0% {
    transform: translateX(0);
  }
  100% {
    transform: translateX(-50%);
  }
}

/* Hero */
.hero {
  padding: 48px 0 64px;
}

.hero-grid {
  display: grid;
  gap: 40px;
  align-items: center;
}

@media (min-width: 960px) {
  .hero-grid {
    grid-template-columns: 1fr 1.05fr;
    gap: 48px;
  }
}

.eyebrow {
  display: inline-block;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--cyan);
  background: var(--cyan-dim);
  border: 1px solid var(--panel-border);
  margin-bottom: 16px;
}

.hero h1 {
  margin: 0 0 16px;
  font-size: clamp(2rem, 5vw, 3rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.1;
}

.hero-lead {
  margin: 0 0 28px;
  font-size: 1.1rem;
  color: var(--muted);
  max-width: 32em;
}

.hero-cta {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-bottom: 24px;
}

.hero-trust {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  font-size: 0.82rem;
  color: var(--muted);
}

.hero-trust span::before {
  content: "✓ ";
  color: var(--cyan);
}

/* Terminal preview */
a.terminal-link {
  display: block;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.2s, border-color 0.2s;
}

a.terminal-link:hover {
  border-color: rgba(94, 234, 212, 0.35);
  box-shadow: 0 0 0 1px rgba(94, 234, 212, 0.12), 0 12px 40px rgba(0, 0, 0, 0.35);
}

.terminal {
  border-radius: 16px;
  border: 1px solid var(--panel-border);
  background: var(--panel);
  backdrop-filter: blur(16px);
  box-shadow:
    0 24px 80px rgba(0, 0, 0, 0.45),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.78rem;
  color: var(--muted);
}

.terminal-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.15);
}

.terminal-dot:nth-child(1) {
  background: #f87171;
}
.terminal-dot:nth-child(2) {
  background: #fbbf24;
}
.terminal-dot:nth-child(3) {
  background: #34d399;
}

.terminal-body {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.term-row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  font-size: 0.85rem;
}

.term-row .label {
  color: var(--muted);
}

.term-row .val {
  font-family: var(--mono);
  font-weight: 600;
}

.term-row .val.live {
  color: var(--cyan);
}

.spark {
  height: 56px;
  border-radius: 8px;
  background: linear-gradient(180deg, var(--cyan-dim), transparent);
  position: relative;
  overflow: hidden;
}

.spark svg {
  width: 100%;
  height: 100%;
}

.mini-book {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  font-size: 0.75rem;
  font-family: var(--mono);
}

.mini-book .asks {
  color: var(--down);
}
.mini-book .bids {
  color: var(--up);
}

.token-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.token-pill {
  padding: 6px 12px;
  border-radius: 8px;
  font-size: 0.78rem;
  font-weight: 600;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.06);
}

.token-pill.hot {
  border-color: rgba(212, 175, 55, 0.4);
  color: var(--gold-soft);
}

/* Sections */
.section {
  padding: 56px 0;
}

.section-head {
  text-align: center;
  max-width: 640px;
  margin: 0 auto 40px;
}

.section-head h2 {
  margin: 0 0 12px;
  font-size: 1.75rem;
  font-weight: 700;
  letter-spacing: -0.02em;
}

.section-head p {
  margin: 0;
  color: var(--muted);
}

.products {
  display: grid;
  gap: 16px;
}

@media (min-width: 640px) {
  .products {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (min-width: 960px) {
  .products {
    grid-template-columns: repeat(3, 1fr);
  }
}

.product-card {
  padding: 24px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(12, 18, 25, 0.6);
  backdrop-filter: blur(8px);
  transition: border-color 0.2s, transform 0.2s;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.product-card:hover {
  border-color: var(--panel-border);
  transform: translateY(-2px);
}

.product-card h3 {
  margin: 0;
  font-size: 1.1rem;
}

.product-card p {
  margin: 0;
  flex: 1;
  font-size: 0.9rem;
  color: var(--muted);
}

.product-card .link {
  font-size: 0.88rem;
  font-weight: 600;
  color: var(--cyan);
}

/* Trust band */
.trust-grid {
  display: grid;
  gap: 20px;
}

@media (min-width: 768px) {
  .trust-grid {
    grid-template-columns: repeat(3, 1fr);
  }
}

.trust-item {
  padding: 20px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.06);
  background: rgba(255, 255, 255, 0.02);
}

.trust-item h3 {
  margin: 0 0 8px;
  font-size: 1rem;
  color: var(--gold-soft);
}

.trust-item p {
  margin: 0;
  font-size: 0.88rem;
  color: var(--muted);
}

/* Footer */
.site-footer {
  margin-top: 48px;
  padding: 40px 0 32px;
  border-top: 1px solid rgba(255, 255, 255, 0.06);
  font-size: 0.85rem;
  color: var(--muted);
}

.footer-grid {
  display: grid;
  gap: 24px;
}

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

.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
}

.footer-links a:hover {
  color: var(--text);
}

/* Inner pages */
.page-hero {
  padding: 48px 0 32px;
}

.page-hero h1 {
  margin: 0 0 12px;
  font-size: 2rem;
}

.page-hero p {
  margin: 0;
  color: var(--muted);
  max-width: 40em;
}

.content-card {
  padding: 28px;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.08);
  background: var(--panel);
  margin-bottom: 24px;
}

.content-card h2 {
  margin: 0 0 12px;
  font-size: 1.15rem;
}

.content-card p,
.content-card ul {
  margin: 0 0 12px;
  color: var(--muted);
  font-size: 0.95rem;
}

.content-card ul {
  padding-left: 1.2rem;
}

.mobile-nav-btn {
  display: flex;
  padding: 8px;
  background: transparent;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  color: var(--text);
  cursor: pointer;
}

@media (min-width: 900px) {
  .mobile-nav-btn {
    display: none;
  }
}

/* Full-screen trading terminal (Simply Exchange embed) */
body.trade-page {
  margin: 0;
  height: 100vh;
  height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.trade-bar {
  flex-shrink: 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  background: rgba(7, 11, 16, 0.92);
  backdrop-filter: blur(10px);
  z-index: 10;
}

.trade-bar-inner {
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 8px 16px;
  max-width: 100%;
}

.trade-bar .brand {
  font-size: 0.95rem;
}

.trade-bar-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.trade-bar-pair {
  font-family: var(--font);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--cyan);
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(94, 234, 212, 0.1);
  border: 1px solid rgba(94, 234, 212, 0.22);
}

.trade-bar-actions {
  margin-left: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.btn-sm {
  padding: 6px 12px;
  font-size: 0.8rem;
}

.trade-shell {
  flex: 1;
  min-height: 0;
  width: 100%;
  position: relative;
  background: #0a0e12;
}

#simply-terminal-root,
#simply-terminal-root #ultrade-root {
  width: 100%;
  height: 100%;
  min-height: 0;
}

/* Try to avoid white iframe/container backgrounds from WL embed */
#simply-terminal-root #ultrade-root,
#simply-terminal-root #ultrade-root > *,
#simply-terminal-root #ultrade-root iframe {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}
