/* Vontrail boost: intro, hero cleanup, interactive graph, premium belt, chatbot, download */

/* ============ INTRO OVERLAY ============ */
#vt-intro {
  position: fixed;
  inset: 0;
  z-index: 2000;
  pointer-events: none;
  background: #fbfbfd;
  overflow: hidden;
  transition: transform 1s cubic-bezier(0.76, 0, 0.24, 1) 0.1s;
  will-change: transform;
}
#vt-intro.vt-intro-done { transform: translateY(-101%); }
#vt-intro.vt-intro-gone { display: none; }

#vt-intro-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

#vt-intro .vt-intro-core {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  transition: opacity 0.4s ease, transform 0.55s cubic-bezier(0.5, 0, 0.75, 0);
}
#vt-intro.vt-intro-done .vt-intro-core {
  opacity: 0;
  transform: translateY(-20px) scale(0.96);
}

#vt-intro .vt-intro-logo {
  width: 62px;
  height: 62px;
  border-radius: 17px;
  overflow: hidden;
  box-shadow: 0 20px 55px rgba(15, 23, 42, 0.22), 0 0 0 1px rgba(15, 23, 42, 0.06);
  animation: vtIntroLogo 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}
#vt-intro .vt-intro-logo img { width: 100%; height: 100%; object-fit: cover; display: block; }

@keyframes vtIntroLogo {
  from { opacity: 0; transform: scale(0.55) rotate(-8deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

#vt-intro .vt-intro-word {
  display: flex;
  overflow: hidden;
  padding-bottom: 4px;
}
#vt-intro .vt-intro-word span {
  display: block;
  font: 800 clamp(24px, 4vw, 38px)/1.1 Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.3em;
  margin-right: -0.3em;
  color: #1d1d1f;
  transform: translateY(120%);
  animation: vtIntroLetter 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}
#vt-intro .vt-intro-word span:nth-child(1) { animation-delay: 0.30s; }
#vt-intro .vt-intro-word span:nth-child(2) { animation-delay: 0.36s; }
#vt-intro .vt-intro-word span:nth-child(3) { animation-delay: 0.42s; }
#vt-intro .vt-intro-word span:nth-child(4) { animation-delay: 0.48s; }
#vt-intro .vt-intro-word span:nth-child(5) { animation-delay: 0.54s; }
#vt-intro .vt-intro-word span:nth-child(6) { animation-delay: 0.60s; }
#vt-intro .vt-intro-word span:nth-child(7) { animation-delay: 0.66s; }
#vt-intro .vt-intro-word span:nth-child(8) { animation-delay: 0.72s; }

@keyframes vtIntroLetter {
  from { transform: translateY(120%); }
  to { transform: translateY(0); }
}

/* ============ BOOT GATING (hero reveals after intro) ============ */
body.vt-boot { overflow: hidden; }
body.vt-boot header { opacity: 0 !important; transform: translateY(-14px) !important; }
body.vt-boot [data-testid="hero-section"] > .relative.z-10 > * { opacity: 0 !important; }
body.vt-boot [data-testid="hero-section"] h1 > span > span { transform: translateY(115%) !important; }
body.vt-boot [class*="vt-chip-pos"], body.vt-boot .vt-hero-card { opacity: 0 !important; }

body.vt-ready header { animation: vtHeaderIn 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.05s both; }
@keyframes vtHeaderIn {
  from { opacity: 0; transform: translateY(-14px); }
  to { opacity: 1; transform: translateY(0); }
}
body.vt-ready [data-testid="hero-section"] > .relative.z-10 > p {
  animation: vtFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.1s both;
}
body.vt-ready [data-testid="hero-section"] h1 > span > span {
  animation: vtMaskUp 1s cubic-bezier(0.22, 1, 0.36, 1) 0.2s both;
}
body.vt-ready [data-testid="hero-section"] h1 > span:nth-child(2) > span { animation-delay: 0.32s; }
@keyframes vtMaskUp {
  from { transform: translateY(115%); }
  to { transform: translateY(0); }
}
body.vt-ready [data-testid="hero-section"] > .relative.z-10 > div.mt-8 {
  animation: vtFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.5s both;
}
body.vt-ready [data-testid="hero-section"] > .relative.z-10 > div.mt-10 {
  animation: vtFadeUp 0.85s cubic-bezier(0.22, 1, 0.36, 1) 0.62s both;
}
@keyframes vtFadeUp {
  from { opacity: 0; transform: translateY(22px); }
  to { opacity: 1; transform: translateY(0); }
}
body.vt-ready [class*="vt-chip-pos"] .glass,
body.vt-ready .vt-hero-card-inner {
  animation: vtCardPop 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
body.vt-ready .vt-chip-pos-1 .glass { animation-delay: 0.55s; }
body.vt-ready .vt-chip-pos-2 .glass { animation-delay: 0.68s; }
body.vt-ready .vt-chip-pos-3 .glass { animation-delay: 0.81s; }
body.vt-ready .vt-hero-card .vt-hero-card-inner { animation-delay: 0.94s; }
@keyframes vtCardPop {
  from { opacity: 0; transform: translateY(20px) scale(0.92); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
body.vt-ready [class*="vt-chip-pos"], body.vt-ready .vt-hero-card { opacity: 1 !important; }

/* ============ HERO CANVAS ============ */
#vt-hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  display: none;
  opacity: 0.55;
}
@media (min-width: 1024px) {
  #vt-hero-canvas { display: block; }
}

/* ============ HERO LAYOUT + STAT CARDS ============ */
@media (min-width: 1024px) {
  [data-testid="hero-section"] {
    min-height: 96vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding-top: 140px !important;
    padding-bottom: 140px !important;
  }
  .vt-chip-pos-1 { left: 4.5% !important; top: 14% !important; opacity: 1; z-index: 2; }
  .vt-chip-pos-2 { right: 4.5% !important; left: auto !important; top: 14% !important; opacity: 1; z-index: 2; }
  .vt-chip-pos-3 { left: 4.5% !important; bottom: 10% !important; top: auto !important; opacity: 1; z-index: 2; }
  .vt-chip-pos-4 { display: none !important; }

  [class*="vt-chip-pos"] .glass,
  .vt-hero-card-inner {
    width: 208px !important;
    padding: 20px 22px !important;
    background: #ffffff !important;
    border: 1px solid rgba(15, 23, 42, 0.07) !important;
    border-radius: 20px !important;
    box-shadow: 0 26px 60px -20px rgba(15, 23, 42, 0.16), 0 2px 8px rgba(15, 23, 42, 0.05) !important;
    -webkit-backdrop-filter: none !important;
    backdrop-filter: none !important;
    transition: transform 0.5s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.5s ease !important;
  }
  [class*="vt-chip-pos"] .glass::before,
  [class*="vt-chip-pos"] .glass::after { display: none !important; }
}

@media (max-width: 1023.5px) {
  [class*="vt-chip-pos"], .vt-hero-card { display: none !important; }
}

.vt-hero-card {
  position: absolute;
  right: 4.5%;
  bottom: 10%;
  z-index: 2;
  transform: rotate(-4deg);
}
.vt-hero-card-float { animation: vtFloat 7s ease-in-out infinite; }
@keyframes vtFloat {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-9px); }
}
.vt-hero-card-inner {
  border-radius: 20px;
  cursor: default;
}
.vt-hero-card-num {
  margin-top: 10px;
  font: 800 32px/1.05 Inter, -apple-system, sans-serif;
  letter-spacing: -0.02em;
  color: #1d1d1f;
}
.vt-hero-card-sub {
  margin-top: 5px;
  font-size: 11px;
  font-weight: 600;
  color: #16a34a;
}
.vt-hero-card svg { display: block; margin-top: 10px; width: 100%; }

.vt-mini-bars {
  margin-top: 10px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 20px;
}
.vt-mini-bars span {
  flex: 1;
  border-radius: 3px;
  background: #2563eb;
}

/* ============ PREMIUM BELT ============ */
[data-testid="services-marquee"] .vt-marquee-track { display: none !important; }
[data-testid="services-marquee"].vt-marquee {
  padding: 0;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}
.vt-belt { position: relative; }
.vt-belt-viewport {
  overflow: hidden;
  padding: 24px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 9%, #000 91%, transparent);
}
.vt-belt-track {
  display: flex;
  width: max-content;
  will-change: transform;
}
.vt-belt-group {
  display: flex;
  align-items: center;
  gap: 58px;
  padding-right: 58px;
}
.vt-belt-item {
  display: inline-flex;
  align-items: center;
  gap: 11px;
  color: rgba(29, 29, 31, 0.38);
  white-space: nowrap;
  cursor: default;
  user-select: none;
  transition: color 0.4s ease, transform 0.5s cubic-bezier(0.22, 1, 0.36, 1);
}
.vt-belt-item svg {
  width: 22px;
  height: 22px;
  flex: 0 0 auto;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.vt-belt-item .vt-belt-word {
  font: 600 16px/1 Inter, -apple-system, BlinkMacSystemFont, sans-serif;
  letter-spacing: 0.01em;
}
.vt-belt-item:hover {
  color: var(--brand, #1d1d1f);
  transform: translateY(-3px) scale(1.07);
}
.vt-belt-item:hover svg { transform: scale(1.15) rotate(-4deg); }
.vt-belt-dot {
  width: 4px;
  height: 4px;
  border-radius: 99px;
  background: rgba(29, 29, 31, 0.16);
  flex: none;
}

/* ============ DOWNLOAD BUTTON ============ */
#vt-download-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 40px;
  padding: 0 16px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #1d1d1f;
  font: 600 12px/1 Inter, -apple-system, sans-serif;
  letter-spacing: 0.01em;
  cursor: pointer;
  box-shadow: 0 1px 3px rgba(15, 23, 42, 0.06);
  transition: transform 0.25s cubic-bezier(0.22, 1, 0.36, 1), box-shadow 0.25s ease, border-color 0.25s ease;
  white-space: nowrap;
}
#vt-download-btn svg { width: 14px; height: 14px; }
#vt-download-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(15, 23, 42, 0.28);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.1);
}
#vt-download-btn:active { transform: scale(0.96); }
#vt-download-btn[disabled] { opacity: 0.65; cursor: wait; }
#vt-download-btn.vt-dl-done { border-color: rgba(22, 163, 74, 0.5); color: #16a34a; }
@media (max-width: 720px) {
  #vt-download-btn { padding: 0 12px; }
  #vt-download-btn span { display: none; }
}

/* ============ CHATBOT ============ */
#vt-chat-root { position: fixed; right: 22px; bottom: 22px; z-index: 1500; font-family: Inter, -apple-system, BlinkMacSystemFont, sans-serif; }
#vt-chat-root * { box-sizing: border-box; }

.vt-chat-launcher {
  position: relative;
  width: 66px;
  height: 66px;
  margin-left: auto;
  border: 0;
  border-radius: 9999px;
  background: #0a0a0a;
  padding: 7px;
  cursor: pointer;
  box-shadow: 0 18px 44px rgba(10, 10, 10, 0.4), 0 0 0 1px rgba(255, 255, 255, 0.08) inset;
  transition: transform 0.35s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.35s ease;
  display: block;
}
.vt-chat-launcher:hover { transform: scale(1.08) rotate(-3deg); box-shadow: 0 24px 60px rgba(10, 10, 10, 0.5); }
.vt-chat-launcher:active { transform: scale(0.94); }
.vt-chat-launcher .vt-mascot-frame {
  width: 100%;
  height: 100%;
  border-radius: 9999px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, #2c2c2e, #111112);
  position: relative;
}
.vt-chat-launcher img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 50% 88%; }
.vt-chat-dot {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 14px;
  height: 14px;
  border-radius: 99px;
  background: #22c55e;
  border: 3px solid #fbfbfd;
}

.vt-chat-hint {
  position: absolute;
  right: 78px;
  bottom: 14px;
  background: #0a0a0a;
  color: #fff;
  font-size: 12.5px;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 14px 14px 4px 14px;
  white-space: nowrap;
  box-shadow: 0 14px 34px rgba(10, 10, 10, 0.35);
  opacity: 0;
  transform: translateX(8px) scale(0.92);
  transform-origin: right bottom;
  transition: opacity 0.45s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
  pointer-events: none;
}
.vt-chat-hint.vt-show { opacity: 1; transform: translateX(0) scale(1); }

.vt-chat-panel {
  position: absolute;
  right: 0;
  bottom: 82px;
  width: min(392px, calc(100vw - 32px));
  height: min(580px, calc(100vh - 130px));
  display: flex;
  flex-direction: column;
  border-radius: 26px;
  background: #ffffff;
  border: 1px solid rgba(15, 23, 42, 0.08);
  box-shadow: 0 40px 110px -20px rgba(10, 10, 10, 0.4), 0 4px 18px rgba(10, 10, 10, 0.08);
  overflow: hidden;
  opacity: 0;
  transform: translateY(22px) scale(0.92);
  transform-origin: right bottom;
  pointer-events: none;
  transition: opacity 0.35s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
#vt-chat-root.vt-open .vt-chat-panel { opacity: 1; transform: translateY(0) scale(1); pointer-events: auto; }
#vt-chat-root.vt-open .vt-chat-launcher { transform: scale(0.9); opacity: 0.92; }
#vt-chat-root.vt-open .vt-chat-hint { display: none; }

.vt-chat-head {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  background: #0a0a0a;
  color: #fff;
  flex: none;
}
.vt-chat-head .vt-mascot-frame {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, #2c2c2e, #131314);
  position: relative;
  flex: none;
}
.vt-chat-head .vt-mascot-frame img { width: 100%; height: 100%; object-fit: contain; display: block; transform-origin: 50% 88%; }
.vt-chat-head-meta { flex: 1; min-width: 0; }
.vt-chat-head-name { font-size: 14.5px; font-weight: 700; letter-spacing: -0.01em; }
.vt-chat-head-sub { display: flex; align-items: center; gap: 6px; margin-top: 3px; font-size: 11px; color: rgba(255, 255, 255, 0.55); font-weight: 500; }
.vt-chat-head-sub i { width: 7px; height: 7px; border-radius: 99px; background: #22c55e; box-shadow: 0 0 0 3px rgba(34, 197, 94, 0.22); }
.vt-chat-close {
  width: 34px;
  height: 34px;
  border-radius: 99px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.25s ease, transform 0.25s ease;
}
.vt-chat-close:hover { background: rgba(255, 255, 255, 0.16); transform: rotate(90deg); }
.vt-chat-close svg { width: 14px; height: 14px; }

.vt-chat-messages {
  flex: 1;
  overflow-y: auto;
  padding: 18px 16px 12px;
  background: #f5f5f7;
  display: flex;
  flex-direction: column;
  gap: 12px;
  scroll-behavior: smooth;
}
.vt-chat-messages::-webkit-scrollbar { width: 5px; }
.vt-chat-messages::-webkit-scrollbar-thumb { background: rgba(15, 23, 42, 0.14); border-radius: 99px; }

.vt-msg {
  max-width: 86%;
  padding: 12px 15px;
  font-size: 13.5px;
  line-height: 1.55;
  border-radius: 18px;
  animation: vtMsgIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
  word-wrap: break-word;
}
@keyframes vtMsgIn {
  from { opacity: 0; transform: translateY(12px) scale(0.96); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.vt-msg-bot {
  align-self: flex-start;
  background: #ffffff;
  color: #1d1d1f;
  border: 1px solid rgba(15, 23, 42, 0.06);
  border-bottom-left-radius: 6px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
}
.vt-msg-user {
  align-self: flex-end;
  background: #0a0a0a;
  color: #ffffff;
  border-bottom-right-radius: 6px;
  box-shadow: 0 8px 20px rgba(10, 10, 10, 0.22);
}
.vt-msg-row { display: flex; align-items: flex-end; gap: 8px; align-self: flex-start; max-width: 92%; }
.vt-msg-row .vt-msg { max-width: 100%; }
.vt-msg-avatar {
  width: 26px;
  height: 26px;
  border-radius: 9px;
  overflow: hidden;
  background: #0a0a0a;
  flex: none;
}
.vt-msg-avatar img { width: 100%; height: 100%; object-fit: contain; }

.vt-typing { display: inline-flex; gap: 5px; padding: 4px 2px; }
.vt-typing i {
  width: 7px;
  height: 7px;
  border-radius: 99px;
  background: #aeaeb2;
  animation: vtTyping 1.1s ease-in-out infinite;
}
.vt-typing i:nth-child(2) { animation-delay: 0.15s; }
.vt-typing i:nth-child(3) { animation-delay: 0.3s; }
@keyframes vtTyping {
  0%, 60%, 100% { transform: translateY(0); opacity: 0.5; }
  30% { transform: translateY(-5px); opacity: 1; }
}

.vt-msg .vt-chat-book-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 10px;
  padding: 10px 18px;
  border: 0;
  border-radius: 9999px;
  background: #0a0a0a;
  color: #fff;
  font: 600 12.5px/1 Inter, sans-serif;
  cursor: pointer;
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.25s ease;
  box-shadow: 0 8px 20px rgba(10, 10, 10, 0.25);
}
.vt-msg .vt-chat-book-cta:hover { transform: scale(1.05); box-shadow: 0 12px 28px rgba(10, 10, 10, 0.32); }
.vt-msg .vt-chat-book-cta:active { transform: scale(0.95); }

.vt-chat-chips {
  flex: none;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding: 12px 14px 14px;
  background: #f5f5f7;
  border-top: 1px solid rgba(15, 23, 42, 0.06);
}
.vt-chip-btn {
  padding: 9px 14px;
  border-radius: 9999px;
  border: 1px solid rgba(15, 23, 42, 0.13);
  background: #ffffff;
  color: #1d1d1f;
  font: 600 12px/1 Inter, sans-serif;
  cursor: pointer;
  transition: background 0.25s ease, color 0.25s ease, transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s ease;
  animation: vtMsgIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
}
.vt-chip-btn:hover {
  background: #1d1d1f;
  color: #ffffff;
  border-color: #1d1d1f;
  transform: translateY(-2px);
}
.vt-chip-btn:active { transform: scale(0.94); }
.vt-chip-btn.vt-chip-book {
  background: #0a0a0a;
  color: #ffffff;
  border-color: #0a0a0a;
}
.vt-chip-btn.vt-chip-book:hover { transform: translateY(-2px) scale(1.03); box-shadow: 0 10px 24px rgba(10, 10, 10, 0.28); }

/* ============ MASCOT MICRO ANIMATIONS ============ */
@keyframes vtWave {
  0%, 100% { transform: rotate(0deg); }
  20% { transform: rotate(-11deg) translateY(-2px); }
  45% { transform: rotate(8deg); }
  70% { transform: rotate(-7deg); }
  88% { transform: rotate(4deg); }
}
.vt-mascot-wave img { animation: vtWave 1.1s cubic-bezier(0.36, 0, 0.4, 1) 2; }

@keyframes vtNod {
  0%, 100% { transform: translateY(0) rotate(0); }
  30% { transform: translateY(3px) rotate(4deg); }
  60% { transform: translateY(-1px) rotate(-3deg); }
}
.vt-mascot-nod img { animation: vtNod 0.55s ease; }

@keyframes vtThumbs {
  0% { transform: scale(1); }
  40% { transform: scale(1.14) rotate(-4deg); }
  70% { transform: scale(0.96); }
  100% { transform: scale(1); }
}
.vt-mascot-thumbs img { animation: vtThumbs 0.7s cubic-bezier(0.34, 1.56, 0.64, 1); }

.vt-thumb-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 26px;
  height: 26px;
  border-radius: 99px;
  background: #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 16px rgba(22, 163, 74, 0.45), 0 0 0 2px #ffffff;
  transform: scale(0);
  pointer-events: none;
  z-index: 3;
}
.vt-thumb-badge svg { width: 14px; height: 14px; }
.vt-thumb-badge.vt-pop { animation: vtThumbPop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) forwards; }
@keyframes vtThumbPop {
  from { transform: scale(0) rotate(-30deg); }
  to { transform: scale(1) rotate(0deg); }
}
.vt-thumb-badge.vt-pop-out { animation: vtThumbOut 0.4s ease forwards; }
@keyframes vtThumbOut {
  to { transform: scale(0); opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  #vt-intro { display: none; }
  .vt-mascot-wave img, .vt-mascot-nod img, .vt-mascot-thumbs img { animation: none; }
}
