/* ============================================================
   Knowtech — Site Animations & Interactive Enhancements
   New file: does not touch or override any existing styles.
   Adds: progress bar, scroll reveal, scroll-spy, hero video,
         stats strip, services showcase, skeleton loaders.
   ============================================================ */

/* ── Reading progress bar ─────────────────────────────────── */
#kt-progress-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 3px;
  background: var(--accent, #3b82f6);
  z-index: 10001;
  pointer-events: none;
  border-radius: 0 2px 2px 0;
  transition: width 0.12s linear;
}

/* ── Scroll reveal ────────────────────────────────────────── */
.kt-reveal {
  opacity: 0;
  transform: translateY(30px);
  transition:
    opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.kt-reveal.kt-visible {
  opacity: 1;
  transform: none;
}
.kt-reveal-d1 { transition-delay: 0.07s; }
.kt-reveal-d2 { transition-delay: 0.14s; }
.kt-reveal-d3 { transition-delay: 0.21s; }
.kt-reveal-d4 { transition-delay: 0.28s; }
.kt-reveal-d5 { transition-delay: 0.35s; }
.kt-reveal-d6 { transition-delay: 0.42s; }
@media (prefers-reduced-motion: reduce) {
  .kt-reveal { opacity: 1; transform: none; transition: none; }
}

/* ── Scroll-spy active nav link ───────────────────────────── */
.nav-links a.kt-spy-active {
  color: var(--accent, #3b82f6) !important;
}
.nav-links a.kt-spy-active::after {
  width: 100% !important;
}

/* ── Hero video background ────────────────────────────────── */
.hero-video-bg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.28;
  z-index: 0;
  pointer-events: none;
}

/* ── Stats strip ──────────────────────────────────────────── */
.kt-stats-strip {
  background: var(--primary, #0f172a);
  padding: clamp(3rem, 5vw, 4.5rem) var(--section-padding-x, 3rem);
  border-top: 1px solid rgba(148, 163, 184, 0.08);
  border-bottom: 1px solid rgba(148, 163, 184, 0.08);
}
.kt-stats-inner {
  max-width: var(--content-max-width, 1400px);
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  gap: 0;
}
.kt-stat-item {
  flex: 1 1 160px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.45rem;
  padding: 0.5rem 1rem;
  text-align: center;
}
.kt-stat-divider {
  width: 1px;
  height: 48px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}
.kt-stat-number {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(2.4rem, 4.5vw, 3.4rem);
  font-weight: 700;
  color: var(--accent, #3b82f6);
  line-height: 1;
  letter-spacing: -0.03em;
  min-width: 4ch;
}
.kt-stat-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.45);
}
@media (max-width: 640px) {
  .kt-stat-divider { display: none; }
  .kt-stats-strip { padding: 2.5rem 1.5rem; }
  .kt-stats-inner { gap: 1.5rem; }
}

/* ── Services Showcase section ────────────────────────────── */
.kt-showcase {
  position: relative;
  background: #080e1d;
  overflow: hidden;
  min-height: 680px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}
#kt-showcase-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}
.kt-showcase-inner {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 860px;
  margin: 0 auto;
  padding: clamp(4rem, 7vw, 6rem) var(--section-padding-x, 3rem);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 2.5rem;
}
.kt-showcase-header {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}
.kt-showcase-label {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent, #3b82f6);
}
.kt-showcase-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.9rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.025em;
  line-height: 1.15;
}

/* Stage — holds one slide at a time */
.kt-showcase-stage {
  position: relative;
  width: 100%;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Individual slide */
.kt-slide {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 1.1rem;
  padding: 0.5rem 0.75rem;
  opacity: 0;
  transition: opacity 0.55s ease;
  pointer-events: none;
}
.kt-slide.kt-slide-active {
  opacity: 1;
  pointer-events: auto;
  position: relative;
}

/* Icon ring */
.kt-slide-icon-wrap {
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: rgba(59, 130, 246, 0.1);
  border: 1px solid rgba(59, 130, 246, 0.22);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.6rem;
  flex-shrink: 0;
  animation: kt-icon-pulse 3.2s ease-in-out infinite;
}
@keyframes kt-icon-pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.18); }
  50%       { box-shadow: 0 0 0 18px rgba(59, 130, 246, 0); }
}
.kt-slide-icon-img {
  width: 48px;
  height: 48px;
  object-fit: contain;
  filter: brightness(0) invert(1);
  opacity: 0.88;
}

.kt-slide-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.55rem, 2.8vw, 2.1rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.kt-slide-desc {
  font-size: 1rem;
  color: rgba(255, 255, 255, 0.58);
  line-height: 1.72;
  max-width: 560px;
  margin: 0;
}
.kt-slide-bullets {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
  text-align: left;
  max-width: 520px;
  width: 100%;
  align-self: center;
}
.kt-slide-bullets li {
  font-size: 0.9rem;
  color: rgba(255, 255, 255, 0.65);
  padding-left: 1.2rem;
  position: relative;
  line-height: 1.55;
}
.kt-slide-bullets li::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent, #3b82f6);
  opacity: 0.8;
}
.kt-slide-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  background: var(--accent, #3b82f6);
  color: #ffffff;
  text-decoration: none;
  padding: 0.8rem 2rem;
  border-radius: 0.5rem;
  font-weight: 600;
  font-size: 0.92rem;
  transition: background 0.2s, transform 0.15s;
  margin-top: 0.35rem;
}
.kt-slide-btn:hover {
  background: var(--accent-hover, #2563eb);
  transform: translateY(-2px);
}

/* Controls row */
.kt-showcase-controls {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  width: 100%;
  max-width: 560px;
}
.kt-showcase-progress-bar {
  width: 100%;
  height: 2px;
  background: rgba(255, 255, 255, 0.1);
  border-radius: 2px;
  overflow: hidden;
}
.kt-showcase-progress-fill {
  height: 100%;
  background: var(--accent, #3b82f6);
  border-radius: 2px;
  width: 0%;
  transition: width 0.1s linear;
}
.kt-showcase-dots-row {
  display: flex;
  align-items: center;
  gap: 1rem;
}
.kt-showcase-arrow {
  background: rgba(255, 255, 255, 0.07);
  border: 1px solid rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.65);
  width: 42px;
  height: 42px;
  border-radius: 50%;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
  flex-shrink: 0;
  padding: 0;
}
.kt-showcase-arrow:hover {
  background: rgba(59, 130, 246, 0.18);
  color: #fff;
  border-color: rgba(59, 130, 246, 0.4);
}
.kt-showcase-dots {
  display: flex;
  gap: 0.5rem;
  flex-wrap: wrap;
  justify-content: center;
}
.kt-showcase-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  padding: 0;
  cursor: pointer;
  transition: background 0.25s, transform 0.2s;
  flex-shrink: 0;
}
.kt-showcase-dot.kt-dot-active {
  background: var(--accent, #3b82f6);
  transform: scale(1.45);
}

/* Loading state */
.kt-showcase-loading {
  color: rgba(255, 255, 255, 0.3);
  font-size: 0.9rem;
  padding: 4rem 0;
}

/* ── Skeleton loading cards ───────────────────────────────── */
.kt-skel-card {
  background: var(--services-surface, #f7f4ef);
  border-radius: 14px;
  padding: 2rem 1.75rem;
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
}
.kt-skel {
  border-radius: 6px;
  background: linear-gradient(
    90deg,
    rgba(26, 32, 44, 0.06) 25%,
    rgba(26, 32, 44, 0.12) 50%,
    rgba(26, 32, 44, 0.06) 75%
  );
  background-size: 200% 100%;
  animation: kt-shimmer 1.5s ease-in-out infinite;
}
@keyframes kt-shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}
.kt-skel-icon  { width: 52px; height: 52px; border-radius: 10px; }
.kt-skel-title { height: 18px; width: 52%; }
.kt-skel-line  { height: 13px; }
.kt-skel-short { height: 13px; width: 68%; }

/* ── Mobile menu slide-in ─────────────────────────────────── */
@media (max-width: 768px) {
  @keyframes kt-menu-in {
    from { opacity: 0; transform: translateY(-10px); }
    to   { opacity: 1; transform: none; }
  }
  @keyframes kt-menu-out {
    from { opacity: 1; transform: none; }
    to   { opacity: 0; transform: translateY(-8px); }
  }
  .nav-links.kt-menu-entering { animation: kt-menu-in 0.26s cubic-bezier(0.22, 1, 0.36, 1) both; }
  .nav-links.kt-menu-leaving  { animation: kt-menu-out 0.18s ease both; }
}

/* ── Responsive tweaks ────────────────────────────────────── */
@media (max-width: 768px) {
  .kt-showcase-inner { padding: 3.5rem 1.5rem; }
  .kt-slide-icon-wrap { width: 76px; height: 76px; font-size: 2.1rem; }
  .kt-showcase-stage { min-height: 400px; }
}
@media (max-width: 480px) {
  .kt-slide-bullets { align-self: flex-start; }
}

/* ═══════════════════════════════════════════════════════════
   SPLIT-PANEL SHOWCASE — Professional service visuals
   ═══════════════════════════════════════════════════════════ */

/* Film-strip perforations at top and bottom of showcase */
.kt-showcase::before,
.kt-showcase::after {
  content: '';
  position: absolute;
  left: 0;
  right: 0;
  height: 22px;
  background-color: rgba(0, 0, 0, 0.72);
  background-image: radial-gradient(circle at center, rgba(40, 40, 40, 0.9) 38%, transparent 39%);
  background-size: 28px 100%;
  background-repeat: repeat-x;
  background-position: 14px center;
  z-index: 10;
  pointer-events: none;
}
.kt-showcase::before { top: 0; }
.kt-showcase::after  { bottom: 0; }

/* Showcase subtitle (Navigate · Transform · Lead) */
.kt-showcase-subtitle {
  font-size: 0.78rem;
  color: rgba(255, 255, 255, 0.35);
  letter-spacing: 0.22em;
  text-transform: uppercase;
  font-weight: 500;
  margin-top: -0.5rem;
}

/* Widen inner for split layout */
.kt-showcase .kt-showcase-inner {
  max-width: min(1040px, 96vw);
}

/* Stage expands to fit active split slide */
.kt-showcase-stage {
  min-height: 380px;
}

/* ── Split slide (row layout) ─────────────────────────────── */
.kt-slide.kt-slide-split {
  flex-direction: row;
  align-items: stretch;
  justify-content: flex-start;
  gap: 0;
  padding: 0;
  border-radius: 14px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.07);
  text-align: left;
  width: 100%;
}

/* Visual panel (left) */
.kt-svc-visual {
  flex: 0 0 46%;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 360px;
}
.kt-svc-visual svg {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* Category badge overlaid on visual */
.kt-svc-badge {
  position: absolute;
  top: 1rem;
  left: 1rem;
  background: rgba(0, 0, 0, 0.52);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.64rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding: 0.28rem 0.7rem;
  border-radius: 100px;
  z-index: 4;
  white-space: nowrap;
}

/* Content panel (right) */
.kt-svc-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  padding: 2.25rem 2rem;
  align-items: flex-start;
  justify-content: center;
  min-height: 360px;
  border-left: 1px solid rgba(255, 255, 255, 0.05);
}

/* Icon + category label row */
.kt-svc-category {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}
.kt-svc-icon {
  font-size: 1.25rem;
  line-height: 1;
}
.kt-svc-cat-label {
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--svc-accent, #3b82f6);
}

/* Service name */
.kt-svc-title {
  font-family: 'Crimson Pro', serif;
  font-size: clamp(1.45rem, 2.2vw, 1.95rem);
  font-weight: 700;
  color: #ffffff;
  letter-spacing: -0.02em;
  line-height: 1.2;
  margin: 0;
}

/* Description */
.kt-svc-desc {
  font-size: 0.875rem;
  color: rgba(255, 255, 255, 0.5);
  line-height: 1.74;
  margin: 0;
  max-width: 340px;
}

/* Bullets inside body */
.kt-svc-body .kt-slide-bullets {
  max-width: none;
  width: 100%;
  align-self: auto;
}
.kt-svc-body .kt-slide-bullets li::before {
  background: var(--svc-accent, #3b82f6);
}

/* CTA button colored by service */
.kt-svc-body .kt-slide-btn {
  margin-top: 0.15rem;
}
.kt-svc-body .kt-slide-btn:hover {
  filter: brightness(1.18);
  background: inherit !important;
  transform: translateY(-2px);
}

/* ── Responsive split → stack ─────────────────────────────── */
@media (max-width: 680px) {
  .kt-slide.kt-slide-split {
    flex-direction: column;
    border-radius: 10px;
  }
  .kt-svc-visual {
    flex: 0 0 200px;
    min-height: 200px;
  }
  .kt-svc-body {
    padding: 1.5rem 1.25rem;
    min-height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
  }
  .kt-showcase-stage { min-height: 560px; }
}
