/* KamTeswa API — premium launch intro overlay.
   Shown once per browser session, self-removing. Scoped under .ktw- / #ktw-. */

#ktw-overlay {
  position: fixed;
  inset: 0;
  z-index: 2147483000;               /* above Swagger + Manual-QA modal/toast */
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(1100px 520px at 50% 18%, rgba(51, 85, 209, .22), transparent 60%),
    linear-gradient(180deg, rgba(15, 23, 42, .98), rgba(15, 23, 42, .96));
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  color: #e7ecf3;
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
  opacity: 0;
  transition: opacity .32s ease;
}
#ktw-overlay.ktw-in { opacity: 1; }
#ktw-overlay.ktw-out { opacity: 0; }

.ktw-card {
  width: min(560px, 92vw);
  padding: 34px 34px 26px;
  text-align: center;
}

.ktw-skip {
  position: absolute;
  top: 18px; right: 20px;
  height: 30px;
  padding: 0 14px;
  border: 1px solid rgba(199, 210, 230, .28);
  border-radius: 999px;
  background: rgba(255, 255, 255, .04);
  color: #c7d2e6;
  font: 600 .78rem "Segoe UI", system-ui, sans-serif;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.ktw-skip:hover { background: rgba(255, 255, 255, .1); border-color: rgba(199, 210, 230, .5); color: #fff; }

.ktw-brand {
  display: inline-flex; align-items: center; gap: 10px;
  opacity: 0; transform: translateY(6px);
}
.ktw-brand.ktw-show { opacity: 1; transform: translateY(0); transition: opacity .4s ease, transform .4s ease; }
.ktw-dot {
  width: 11px; height: 11px; border-radius: 50%;
  background: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .18), 0 0 14px rgba(52, 211, 153, .7);
}
.ktw-brand-name { font-size: 1.4rem; font-weight: 800; letter-spacing: -.02em; }

.ktw-tagline {
  margin: 8px 0 26px;
  font-size: .9rem;
  color: #9aa7bd;
  min-height: 1.2em;
  opacity: 0;
}
.ktw-tagline.ktw-show { opacity: 1; transition: opacity .4s ease; }

/* ---- Route line with module nodes -------------------------------------- */
.ktw-route {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 6px;
  margin: 0 auto;
  max-width: 460px;
}
.ktw-track {
  position: absolute;
  left: 6%; right: 6%;
  top: 13px;
  height: 2px;
  background: rgba(148, 163, 184, .22);
  border-radius: 2px;
  overflow: hidden;
}
.ktw-track-fill {
  position: absolute; inset: 0;
  width: 0%;
  background: linear-gradient(90deg, #3355d1, #34d399);
  box-shadow: 0 0 10px rgba(51, 85, 209, .7);
  border-radius: 2px;
  transition: width .8s cubic-bezier(.4, 0, .2, 1);
}

.ktw-node {
  position: relative;
  z-index: 1;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  flex: 1 1 0;
  opacity: 0; transform: translateY(4px);
}
.ktw-node.ktw-show { opacity: 1; transform: translateY(0); transition: opacity .3s ease, transform .3s ease; }
.ktw-node-dot {
  width: 12px; height: 12px; border-radius: 50%;
  background: #1e2636;
  border: 2px solid #3a465e;
  transition: background .3s ease, border-color .3s ease, box-shadow .3s ease;
}
.ktw-node.ktw-active .ktw-node-dot {
  background: #34d399; border-color: #34d399;
  box-shadow: 0 0 0 4px rgba(52, 211, 153, .16), 0 0 12px rgba(52, 211, 153, .6);
}
.ktw-node-label {
  font-size: .68rem; font-weight: 700; letter-spacing: .02em; color: #8493ab;
  transition: color .3s ease;
  white-space: nowrap;
}
.ktw-node.ktw-active .ktw-node-label { color: #cfe9dd; }

.ktw-footer {
  margin-top: 28px;
  font-size: .82rem;
  color: #7f8da3;
  min-height: 1.1em;
  opacity: 0;
}
.ktw-footer.ktw-show { opacity: 1; transition: opacity .4s ease; }
.ktw-footer strong { color: #e7ecf3; font-weight: 700; }

/* ---- Reduced motion: no movement, quick static fade -------------------- */
@media (prefers-reduced-motion: reduce) {
  #ktw-overlay, #ktw-overlay.ktw-in, #ktw-overlay.ktw-out { transition: opacity .12s linear; }
  .ktw-brand, .ktw-tagline, .ktw-node, .ktw-footer { transition: none !important; transform: none !important; opacity: 1 !important; }
  .ktw-track-fill { transition: none !important; }
}
