/* custom.css – Premium UI enhancements */

/* ---------- Color Palette & Typography ---------- */
/* Removed overriding :root variables to preserve the strict matte-black Fey Terminal theme from index.html */

body {
  line-height: 1.6;
  overflow-x: hidden;
}

/* ---------- Glassmorphism Card ---------- */
/* Removed transparent glassmorphism to keep the solid, dark Bloomberg aesthetic */

/* ---------- Button Enhancements ---------- */
/* .btn-buy styles are defined in index.html for theme-based styling */
.btn-card {
  background: var(--accent);
  color: #fff;
  border: none;
  border-radius: 999px;
  box-shadow: var(--shadow);
  transition: background 0.3s ease, transform 0.2s ease;
}

.btn-card:hover {
  background: #3d5a8f;
  transform: translateY(-4px) scale(1.02);
}

/* ---------- Theme Toggle Icon Transition ---------- */
.theme-toggle svg {
  transition: transform 0.4s ease, opacity 0.4s ease;
}

body.light-theme .theme-toggle .sun-icon { opacity: 1; transform: rotate(0deg) scale(1); }
body.light-theme .theme-toggle .moon-icon { opacity: 0; transform: rotate(90deg) scale(0); }

/* ---------- Scroll Top Button ---------- */
.scroll-top {
  background: var(--bg-card);
  border: 1px solid var(--border-color);
  transition: background 0.3s, transform 0.2s, opacity 0.3s;
}
.scroll-top:hover {
  background: var(--bg-card-hover);
  transform: translateY(-4px);
}

/* ---------- Hero Section Parallax Overlay ---------- */
.hero {
  background: radial-gradient(circle at 50% 30%, var(--bg-secondary) 0%, var(--bg-primary) 80%);
  overflow: hidden;
}
.hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 20% 40%, rgba(255,255,255,0.02) 0%, transparent 70%),
    radial-gradient(circle at 80% 60%, rgba(255,255,255,0.02) 0%, transparent 70%);
  pointer-events: none;
}

/* ---------- Responsive Adjustments ---------- */
@media (max-width: 768px) {
  .card {
    width: 100% !important;
    max-width: 340px;
  }
  .hero h1 { font-size: 4rem; }
}

@media (max-width: 480px) {
  .hero h1 { font-size: 3rem; }
  .btn-card { padding: 0.8rem 2rem; font-size: 0.8rem; }
}

/* ---------- Reveal Animation ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s ease, transform 0.8s ease;
}
.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* ---------- Footer Styling ---------- */
footer {
  color: var(--text-secondary);
  background: transparent;
  padding: 2rem 0;
}

/* Body background and text color use CSS variables */
body {
  background-color: var(--bg-primary);
  color: var(--text-primary);
}

/* Canvas background */
#bg {
  background: var(--bg-primary);
}

/* Navigation bar colors - убрали background чтобы не перезаписывать полупрозрачность */
nav {
  color: var(--text-primary);
}

/* Hero section text contrast */
.hero h1,
.hero-label,
.hero-badge {
  color: var(--text-primary);
}


/* ═══════════════════════════════════════════════════════════
   REFERENCE GLASS NAV
   ═══════════════════════════════════════════════════════════ */
.reference-nav {
  top: 20px !important;
  left: 50% !important;
  right: auto !important;
  width: max-content !important;
  max-width: calc(100% - 24px);
  opacity: 0 !important;
  visibility: hidden !important;
  pointer-events: none !important;
  transform: translate(-50%, -12px) !important;
  transition: opacity .28s ease, transform .28s ease, visibility .28s ease, box-shadow .28s ease, background .28s ease !important;
  margin: 0 auto;
  height: 50px;
  padding: 0 9px 0 16px !important;
  display: flex !important;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  border: 1px solid rgba(255,255,255,.10) !important;
  border-radius: 28px;
  background: rgba(18, 18, 22, .72) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.22), inset 0 1px 0 rgba(255,255,255,.04);
  backdrop-filter: blur(18px) saturate(150%);
  -webkit-backdrop-filter: blur(18px) saturate(150%);
}


/* Show the compact navigation only after the first scroll. */
.reference-nav.scrolled {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
  transform: translate(-50%, 0) !important;
}

.reference-nav__brand-wrap,
.reference-nav__links,
.reference-nav__brand,
.reference-nav__item,
.reference-nav__login,
.reference-nav__language,
.reference-nav__lang-current {
  display: flex;
  align-items: center;
}

.reference-nav__brand-wrap { min-width: 0; gap: 16px; }
.reference-nav__brand {
  gap: 9px;
  color: #f5f6fa !important;
  text-decoration: none;
  font-size: 15px;
  font-weight: 800;
  letter-spacing: -.02em;
  white-space: nowrap;
}
.reference-nav__brand-mark {
  width: 15px;
  height: 15px;
  border: 2px solid #8d7cff;
  transform: rotate(45deg);
  border-radius: 2px;
  box-shadow: 0 0 12px rgba(141,124,255,.24);
}
.reference-nav__divider {
  width: 1px;
  height: 23px;
  background: rgba(255,255,255,.09);
  flex: 0 0 auto;
}
.reference-nav__links { gap: 2px; min-width: 0; }
.reference-nav__item {
  gap: 8px;
  padding: 8px 12px;
  border-radius: 9px;
  color: rgba(190,193,203,.68) !important;
  text-decoration: none !important;
  font-size: 13px !important;
  font-weight: 600 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
  white-space: nowrap;
  transition: color .2s ease, background .2s ease;
}
.reference-nav__item svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.reference-nav__item:hover {
  color: #f2f3f6 !important;
  background: rgba(255,255,255,.045);
}
.reference-nav__divider--inner { margin: 0 5px 0 7px; height: 22px; }
.reference-nav__theme {
  width: 30px !important;
  height: 30px !important;
  min-width: 30px;
  margin: 0 1px !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
  color: rgba(190,193,203,.65);
  box-shadow: none !important;
}
.reference-nav__theme:hover { color: #fff; transform: none !important; }
.reference-nav__theme .sun-icon { opacity: 0; transform: rotate(-90deg) scale(0); }
.reference-nav__theme .moon-icon { opacity: 1; transform: rotate(0) scale(1); }
body.light-theme .reference-nav__theme .sun-icon { opacity: 1; transform: rotate(0) scale(1); }
body.light-theme .reference-nav__theme .moon-icon { opacity: 0; transform: rotate(90deg) scale(0); }

.reference-nav__language { position: relative; }
.reference-nav__lang-current {
  gap: 5px;
  border: 0;
  background: transparent;
  color: rgba(190,193,203,.72);
  cursor: pointer;
  padding: 8px 9px;
  font: 600 12px/1 inherit;
}
.reference-nav__lang-current:hover { color: #fff; }
.reference-nav__lang-current svg { width: 12px; height: 12px; fill: none; stroke: currentColor; stroke-width: 1.8; }
.reference-nav__lang-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  min-width: 66px;
  padding: 5px;
  border: 1px solid rgba(255,255,255,.1);
  border-radius: 12px;
  background: rgba(18,18,22,.94);
  box-shadow: 0 14px 30px rgba(0,0,0,.3);
  backdrop-filter: blur(16px);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-4px);
  transition: opacity .18s ease, transform .18s ease, visibility .18s ease;
}
.reference-nav__language.open .reference-nav__lang-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}
.reference-nav__lang-menu button {
  display: block;
  width: 100%;
  border: 0;
  background: transparent;
  color: rgba(210,212,220,.7);
  padding: 7px 9px;
  border-radius: 7px;
  cursor: pointer;
  font-size: 11px;
  font-weight: 700;
}
.reference-nav__lang-menu button:hover { color: #fff; background: rgba(255,255,255,.06); }

.reference-nav__login {
  justify-content: center;
  gap: 7px;
  min-width: 82px;
  height: 34px;
  padding: 0 14px !important;
  border-radius: 18px !important;
  border: 1px solid rgba(255,255,255,.08) !important;
  background: rgba(255,255,255,.045) !important;
  color: #f4f4f6 !important;
  font-size: 13px !important;
  font-weight: 700 !important;
  letter-spacing: 0 !important;
  text-transform: none !important;
}
.reference-nav__login::before { content: '↪'; font-size: 15px; line-height: 1; }
.reference-nav__login:hover {
  background: rgba(255,255,255,.09) !important;
  border-color: rgba(255,255,255,.14) !important;
  color: #fff !important;
}
.reference-nav .btn-account { margin-left: 0; }

body.light-theme .reference-nav {
  background: rgba(248,249,251,.78) !important;
  border-color: rgba(0,0,0,.09) !important;
  box-shadow: 0 10px 30px rgba(0,0,0,.10), inset 0 1px 0 rgba(255,255,255,.8);
}
body.light-theme .reference-nav__brand { color: #15171c !important; }
body.light-theme .reference-nav__item,
body.light-theme .reference-nav__lang-current,
body.light-theme .reference-nav__theme { color: rgba(35,39,48,.64) !important; }
body.light-theme .reference-nav__item:hover,
body.light-theme .reference-nav__lang-current:hover,
body.light-theme .reference-nav__theme:hover { color: #111 !important; }
body.light-theme .reference-nav__login { color: #15171c !important; background: rgba(0,0,0,.035) !important; border-color: rgba(0,0,0,.1) !important; }

@media (max-width: 760px) {
  .reference-nav { max-width: calc(100% - 24px); }
  .reference-nav__item span { display: none; }
  .reference-nav__item { padding: 8px; }
  .reference-nav__divider--inner { display: none; }
  .reference-nav__theme { display: none !important; }
  .reference-nav__brand-wrap { gap: 10px; }
  .reference-nav__login { min-width: 72px; padding: 0 11px !important; }
}

/* Tighten the brand-to-menu spacing to match the reference. */
.reference-nav {
  justify-content: flex-start;
  flex-shrink: 0;
}
.reference-nav__brand-wrap {
  gap: 10px;
}
.reference-nav__links {
  margin-left: 10px;
}

/* Final navigation spacing: keep the divider close to the "vie" brand. */
.reference-nav .reference-nav__brand-wrap {
  gap: 12px !important;
}
.reference-nav .reference-nav__divider:not(.reference-nav__divider--inner) {
  margin-left: 0 !important;
  margin-right: 0 !important;
}
