/* ============================================
   VAY Finance — Custom Design System
   ============================================ */

:root {
  --bg: #07090F;
  --bg2: #0D1117;
  --bg3: #111820;
  --card: #131C27;
  --card2: #1A2535;
  --border: #1E2D3D;
  --green: #00C896;
  --green2: #00A87E;
  --green-glow: rgba(0,200,150,.15);
  --text: #E2E8F0;
  --muted: #6B7A8F;
  --red: #FF4D6A;
  --yellow: #F6C90E;
  --radius: 14px;
  --radius-sm: 8px;
  --font: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --shadow: 0 4px 32px rgba(0,0,0,.45);
  --shadow-green: 0 0 32px rgba(0,200,150,.18);
}

/* ---- CRITICAL: .page{overflow:hidden;display:flex} breaks position:fixed in some browsers ---- */
.page {
  overflow: visible !important;
}
/* ---- Fixed header: override original position:relative and padding-top:5rem ---- */
.header {
  position: fixed !important;
  top: 0 !important;
  left: 0 !important;
  right: 0 !important;
  width: 100% !important;
  padding: 0 !important;
  margin: 0 !important;
  z-index: 9999 !important;
  box-sizing: border-box !important;
}
/* ---- Push ALL page content below 68px fixed header ---- */
.page__wrapper {
  padding-top: 68px !important;
  margin-top: 0 !important;
}
body {
  padding-top: 0 !important;
  margin-top: 0 !important;
}

/* ---- Critical override: kill original calc negative margin ---- */
.calc__container {
  margin-top: 0 !important;
  margin-bottom: 0 !important;
  padding-top: 0 !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  border-top: none !important;
  z-index: auto !important;
  position: static !important;
}
.calc__item {
  background: transparent !important;
  box-shadow: none !important;
  padding: 0 !important;
  max-width: 100% !important;
}
.calc__block { width: auto !important; }

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

/* ---- Layout ---- */
.wrapper { max-width: 1200px; margin: 0 auto; padding: 0 24px; }
.section { padding: 80px 0; }

/* ============================================
   HEADER
   ============================================ */
.header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 1000;
  background: rgba(7,9,15,.85);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border);
  height: 68px;
}
.header__wrapper {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 68px;
}
.logo {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.5px;
  color: var(--text);
}
.logo__icon {
  width: 36px; height: 36px;
  background: var(--green);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
}
.logo__icon svg { width: 20px; height: 20px; }
.logo__name span { color: var(--green); font-weight: 400; }
.logo img { height: 34px; width: auto; }

.nav { display: flex; align-items: center; gap: 8px; }
.nav a {
  padding: 7px 14px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  transition: color .2s, background .2s;
}
.nav a:hover, .nav a.active { color: var(--text); background: var(--card); }

.header__actions { display: flex; align-items: center; gap: 10px; }
.header__link {
  padding: 8px 16px;
  font-size: 14px;
  font-weight: 500;
  color: var(--muted);
  border-radius: var(--radius-sm);
  transition: color .2s;
}
.header__link:hover { color: var(--text); }

/* ============================================
   BUTTONS
   ============================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 22px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  transition: all .2s;
  cursor: pointer;
  white-space: nowrap;
}
.btn--main, .btn--green {
  background: var(--green);
  color: #07090F;
  box-shadow: 0 4px 20px rgba(0,200,150,.3);
}
.btn--main:hover, .btn--green:hover {
  background: var(--green2);
  box-shadow: 0 4px 28px rgba(0,200,150,.45);
  transform: translateY(-1px);
}
.btn--o-main, .btn--outline {
  background: transparent;
  border: 1.5px solid var(--green);
  color: var(--green);
}
.btn--o-main:hover { background: var(--green-glow); }
.btn--white {
  background: var(--text);
  color: var(--bg);
  font-weight: 700;
}
.btn--white:hover { background: #c8d4e0; }
.btn--lg { padding: 14px 32px; font-size: 16px; border-radius: var(--radius); }
.btn--full { width: 100%; }

/* ============================================
   INTRO / HERO
   ============================================ */
.intro {
  min-height: calc(100vh - 68px) !important;
  display: flex !important;
  align-items: center !important;
  padding: 60px 0 !important;
  background: var(--bg) !important;
  position: relative !important;
  overflow: hidden !important;
}
.intro::before {
  content: '';
  position: absolute;
  top: -200px; right: -200px;
  width: 700px; height: 700px;
  background: radial-gradient(circle, rgba(0,200,150,.08) 0%, transparent 70%);
  pointer-events: none;
}
.intro::after {
  content: '';
  position: absolute;
  bottom: -100px; left: -150px;
  width: 500px; height: 500px;
  background: radial-gradient(circle, rgba(0,136,255,.05) 0%, transparent 70%);
  pointer-events: none;
}
.intro .wrapper { width: 100%; padding-top: 60px; padding-bottom: 60px; }
.intro__layout {
  display: grid !important;
  grid-template-columns: 1fr 420px !important;
  gap: 60px !important;
  align-items: start !important;
}
.intro__badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 6px 14px;
  font-size: 13px;
  color: var(--green);
  margin-bottom: 24px;
}
.intro__badge::before {
  content: '';
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--green);
  animation: pulse 2s infinite;
}
@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: .3; }
}
.intro__title {
  font-size: clamp(36px, 5vw, 58px);
  font-weight: 800;
  line-height: 1.1;
  letter-spacing: -1.5px;
  color: var(--text);
  margin-bottom: 20px;
}
.intro__title .accent { color: var(--green); }
.intro__desc {
  font-size: 17px;
  color: var(--muted);
  line-height: 1.7;
  max-width: 480px;
  margin-bottom: 36px;
}
.intro__stats {
  display: flex;
  gap: 32px;
  flex-wrap: wrap;
}
.intro__stat-val {
  font-size: 24px;
  font-weight: 700;
  color: var(--text);
}
.intro__stat-label {
  font-size: 12px;
  color: var(--muted);
  margin-top: 2px;
}

/* ============================================
   EXCHANGE CARD
   ============================================ */
.calc__section { padding: 0; }
.calc__container { padding: 0; }

.exchange-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 20px;
  overflow: hidden;
  box-shadow: var(--shadow);
}
.exchange-card__header {
  padding: 20px 24px 0;
  display: flex;
  gap: 4px;
  border-bottom: 1px solid var(--border);
}
.exchange-card__tab {
  padding: 10px 20px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
  cursor: pointer;
  transition: all .2s;
  position: relative;
  bottom: -1px;
  border: 1px solid transparent;
  background: transparent;
}
.exchange-card__tab.active {
  color: var(--text);
  background: var(--card2);
  border-color: var(--border);
  border-bottom-color: var(--card2);
}
.exchange-card__body { padding: 24px; }
.exchange-card__rate {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  margin-bottom: 16px;
  font-size: 13px;
  color: var(--muted);
}
.exchange-card__rate-val { color: var(--green); font-weight: 600; }

.form__group {
  margin-bottom: 12px;
}
.form__group .label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .6px;
  margin-bottom: 8px;
}
.form__group .required { color: var(--red); }

.input-wrap {
  display: flex;
  align-items: center;
  background: var(--bg2);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color .2s;
}
.input-wrap:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px rgba(0,200,150,.1); }
.input-wrap .input {
  flex: 1;
  background: transparent;
  border: none;
  outline: none;
  padding: 13px 16px;
  font-size: 18px;
  font-weight: 600;
  color: var(--text);
}
.input-wrap .input::placeholder { color: var(--muted); font-weight: 400; font-size: 15px; }
.input-wrap .currency-badge {
  padding: 0 16px;
  font-size: 13px;
  font-weight: 700;
  color: var(--green);
  border-left: 1px solid var(--border);
  height: 100%;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
  background: var(--bg3);
  min-width: 90px;
  cursor: pointer;
}
.input-wrap .currency-badge select {
  background: transparent;
  border: none;
  outline: none;
  color: inherit;
  font-size: inherit;
  font-weight: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
}

/* Override existing input styles */
.calc__item .input, .calc__item input[type=text], .calc__item input[type=number] {
  background: var(--bg2) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  font-size: 16px !important;
  padding: 12px 16px !important;
  width: 100% !important;
  outline: none !important;
  transition: border-color .2s !important;
}
.calc__item .input:focus, .calc__item input:focus {
  border-color: var(--green) !important;
  box-shadow: 0 0 0 3px rgba(0,200,150,.1) !important;
}
.calc__item select {
  background: var(--bg3) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 12px 16px !important;
  width: 100% !important;
  outline: none !important;
  appearance: none !important;
}

/* ============================================
   CRYPTO TICKER (top bar)
   ============================================ */
.ticker-bar {
  background: var(--bg2);
  border-bottom: 1px solid var(--border);
  padding: 10px 0;
  overflow: hidden;
  position: relative;
  top: 68px;
  z-index: 100;
}
.ticker-track {
  display: flex;
  gap: 40px;
  animation: ticker 30s linear infinite;
  width: max-content;
}
@keyframes ticker {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}
.ticker-item {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
}
.ticker-item .price { color: var(--muted); font-weight: 400; }
.ticker-item .up { color: var(--green); }
.ticker-item .dn { color: var(--red); }

/* ============================================
   CALC SECTION OVERRIDES
   ============================================ */
.calc__section {
  background: transparent !important;
  padding: 0 !important;
}
.calc__bg { display: none !important; }
.calc__wrapper {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
}
.calc__block {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  box-shadow: var(--shadow) !important;
  overflow: hidden !important;
  padding: 24px !important;
}
.calc__item { padding: 0 !important; }
.block__title {
  font-size: clamp(28px, 4vw, 42px) !important;
  font-weight: 800 !important;
  letter-spacing: -1px !important;
  color: var(--text) !important;
  margin-bottom: 32px !important;
  text-align: center !important;
  line-height: 1.2 !important;
}
.block__title::after { display: none !important; }

/* ============================================
   FEATURES / ADVANTAGES
   ============================================ */
.features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
  margin-top: 48px;
}
.feature-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 28px 24px;
  transition: border-color .2s, transform .2s;
}
.feature-card:hover {
  border-color: var(--green);
  transform: translateY(-4px);
}
.feature-icon {
  width: 48px; height: 48px;
  background: var(--green-glow);
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  margin-bottom: 16px;
  font-size: 22px;
}
.feature-title {
  font-size: 16px;
  font-weight: 700;
  color: var(--text);
  margin-bottom: 8px;
}
.feature-desc { font-size: 14px; color: var(--muted); line-height: 1.6; }

/* ============================================
   FOOTER
   ============================================ */
.footer {
  background: var(--bg2) !important;
  border-top: 1px solid var(--border) !important;
  padding: 48px 0 32px !important;
  margin-top: 0 !important;
}
.footer .wrapper { display: flex; flex-direction: column; gap: 36px; }
.footer__top {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 40px;
}
.footer__brand .logo { margin-bottom: 12px; }
.footer__brand p { font-size: 14px; color: var(--muted); line-height: 1.7; max-width: 260px; }
.footer__col-title {
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .8px;
  color: var(--muted);
  margin-bottom: 16px;
}
.footer__nav {
  display: flex !important;
  flex-direction: column !important;
  gap: 10px !important;
}
.footer__nav-link, .footer__nav a {
  font-size: 14px !important;
  color: var(--muted) !important;
  transition: color .2s !important;
  padding: 0 !important;
}
.footer__nav-link:hover, .footer__nav a:hover { color: var(--text) !important; }
.footer__links {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.footer__links a {
  font-size: 14px;
  color: var(--muted);
  transition: color .2s;
}
.footer__links a:hover { color: var(--text); }
.footer__bottom {
  border-top: 1px solid var(--border);
  padding-top: 24px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
}
.footer__text, .footer .footer__text {
  font-size: 13px !important;
  color: var(--muted) !important;
}
.footer__wrapper {
  display: none !important;
}
.soc { display: flex; gap: 12px; }
.soc__link {
  width: 36px; height: 36px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  display: flex; align-items: center; justify-content: center;
  transition: border-color .2s, background .2s;
}
.soc__link:hover { border-color: var(--green); background: var(--green-glow); }
.soc__link img { width: 18px; height: 18px; filter: brightness(0) invert(.6); }

/* Subscribe form redesign */
.subscribe {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 28px !important;
  margin: 0 !important;
  max-width: 100% !important;
  display: flex !important;
  align-items: center !important;
  gap: 20px !important;
  flex-wrap: wrap !important;
}
.subscribe .title {
  font-size: 18px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  white-space: nowrap !important;
  flex-shrink: 0 !important;
}
.subscribe .form__group {
  flex: 1 !important;
  margin: 0 !important;
  min-width: 200px !important;
}
.subscribe .label { display: none !important; }
.subscribe .input {
  background: var(--bg2) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 11px 16px !important;
  width: 100% !important;
  font-size: 14px !important;
  outline: none !important;
}
.subscribe .input:focus { border-color: var(--green) !important; }
.subscribe .checkbox { display: none !important; }
.subscribe button { margin: 0 !important; }

/* ============================================
   MODALS
   ============================================ */
.remodal {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  color: var(--text) !important;
  padding: 32px !important;
  max-width: 440px !important;
}
.remodal .modal__title {
  font-size: 22px !important;
  font-weight: 700 !important;
  color: var(--text) !important;
  margin-bottom: 24px !important;
}
.remodal .input, .remodal input[type=email], .remodal input[type=password], .remodal input[type=text] {
  background: var(--bg2) !important;
  border: 1.5px solid var(--border) !important;
  border-radius: var(--radius-sm) !important;
  color: var(--text) !important;
  padding: 12px 16px !important;
  width: 100% !important;
  outline: none !important;
}
.remodal .input:focus, .remodal input:focus { border-color: var(--green) !important; }
.remodal .label, .remodal label { color: var(--muted) !important; font-size: 13px !important; }
.remodal-overlay { background: rgba(0,0,0,.7) !important; backdrop-filter: blur(8px); }
.remodal-close { color: var(--muted) !important; }
.remodal-close:hover { color: var(--text) !important; }

/* ============================================
   ALERT / NOTIFY
   ============================================ */
.alert {
  border-radius: var(--radius-sm) !important;
  padding: 12px 16px !important;
  font-size: 14px !important;
  border: 1px solid !important;
}
.alert--green { background: rgba(0,200,150,.1) !important; border-color: var(--green) !important; color: var(--green) !important; }
.alert--red { background: rgba(255,77,106,.1) !important; border-color: var(--red) !important; color: var(--red) !important; }

/* ============================================
   CABINET / DASHBOARD
   ============================================ */
.cabinet-header { background: var(--bg2) !important; border-bottom: 1px solid var(--border) !important; }
.cabinet__sidebar {
  background: var(--bg2) !important;
  border-right: 1px solid var(--border) !important;
}
.table {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  overflow: hidden !important;
  width: 100% !important;
  border-collapse: separate !important;
  border-spacing: 0 !important;
}
.table th {
  background: var(--bg2) !important;
  color: var(--muted) !important;
  font-size: 12px !important;
  font-weight: 600 !important;
  text-transform: uppercase !important;
  letter-spacing: .6px !important;
  padding: 12px 16px !important;
  border-bottom: 1px solid var(--border) !important;
}
.table td {
  padding: 14px 16px !important;
  border-bottom: 1px solid var(--border) !important;
  color: var(--text) !important;
  font-size: 14px !important;
}
.table tr:last-child td { border-bottom: none !important; }
.table tr:hover td { background: var(--bg3) !important; }

/* ============================================
   PRELOADER
   ============================================ */
.preloader {
  background: var(--bg) !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 99999 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
}
.preloader::after {
  content: '' !important;
  width: 40px !important; height: 40px !important;
  border: 3px solid var(--border) !important;
  border-top-color: var(--green) !important;
  border-radius: 50% !important;
  animation: spin .8s linear infinite !important;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================
   CRYPTO PAGE
   ============================================ */
.crypto__header { padding-top: 100px !important; }
.price-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 50px;
  padding: 5px 14px;
  font-size: 14px;
  font-weight: 600;
}
.price-badge.up { color: var(--green); border-color: var(--green); background: var(--green-glow); }
.price-badge.dn { color: var(--red); border-color: var(--red); background: rgba(255,77,106,.1); }

/* ============================================
   STEPS / FLOW
   ============================================ */
.steps__item {
  background: var(--card) !important;
  border: 1px solid var(--border) !important;
  border-radius: var(--radius) !important;
  padding: 24px !important;
}
.steps__num {
  background: var(--green-glow) !important;
  color: var(--green) !important;
  border: 1px solid var(--green) !important;
  width: 40px !important; height: 40px !important;
  border-radius: 10px !important;
  font-weight: 700 !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  font-size: 16px !important;
  margin-bottom: 16px !important;
}

/* ============================================
   RESPONSIVE
   ============================================ */
@media (max-width: 900px) {
  .intro__layout { grid-template-columns: 1fr; }
  .features-grid { grid-template-columns: 1fr 1fr; }
  .footer__top { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .footer__top { grid-template-columns: 1fr; }
  .intro__title { font-size: 32px; }
  .nav { display: none; }
  .subscribe { flex-direction: column !important; }
}

/* ============================================
   MISC OVERRIDES
   ============================================ */
.section-title, h2.title {
  font-size: clamp(28px, 4vw, 40px) !important;
  font-weight: 800 !important;
  color: var(--text) !important;
  letter-spacing: -1px !important;
}
.separator { background: var(--border) !important; }
.cookie__bar { background: var(--card) !important; border-top: 1px solid var(--border) !important; color: var(--text) !important; }
.cookie__bar .btn--main { background: var(--green) !important; color: #07090F !important; }
select option { background: var(--card); color: var(--text); }
.benefits__item { background: var(--card) !important; border: 1px solid var(--border) !important; border-radius: var(--radius) !important; }
.menu__btn i, .menu__btn i::before, .menu__btn i::after { background: var(--text) !important; }
.js-menu, .menu { background: var(--card) !important; border-right: 1px solid var(--border) !important; }

/* Scrollbar */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: var(--bg2); }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: var(--muted); }

/* Selection */
::selection { background: rgba(0,200,150,.25); color: var(--text); }
