/* v164: visual and motion enhancement only. Existing IA and three-column layout stay unchanged. */
:root {
  --v164-ink: #0b1728;
  --v164-blue: #164c86;
  --v164-line: rgba(15, 42, 72, .13);
  --v164-shadow: 0 20px 54px rgba(11, 30, 52, .11);
  --v164-ease: cubic-bezier(.22, 1, .36, 1);
}

html { scroll-behavior: smooth; }
body.v164-visual-enhanced { background: #eef2f6; }

/* Cinematic hero without increasing its footprint. */
.v164-visual-enhanced .trust-carousel {
  isolation: isolate;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 18px 50px rgba(2, 12, 27, .22);
}
.v164-visual-enhanced .hero-card {
  transition: opacity .58s var(--v164-ease), transform .7s var(--v164-ease);
  transform: translate3d(12px,0,0) scale(.995);
}
.v164-visual-enhanced .hero-card.active { transform: translate3d(0,0,0) scale(1); }
.v164-visual-enhanced .hero-visual { position: relative; overflow: hidden; }
.v164-visual-enhanced .hero-visual::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(90deg, rgba(5,16,30,.10), transparent 52%);
}
.v164-visual-enhanced .hero-visual img {
  transform: scale(1.025);
  transition: transform 7s linear, filter .5s ease;
  filter: saturate(.94) contrast(1.04);
}
.v164-visual-enhanced .hero-card.active .hero-visual img { transform: scale(1.075); }
.v164-visual-enhanced .hero-copy > * {
  opacity: 1;
  transform: none;
}
.v164-visual-enhanced .hero-card.active .hero-copy > * { animation: v164-copy-in .55s var(--v164-ease) both; }
.v164-visual-enhanced .hero-card.active .hero-copy > :nth-child(2) { animation-delay: .06s; }
.v164-visual-enhanced .hero-card.active .hero-copy > :nth-child(3) { animation-delay: .12s; }
.v164-visual-enhanced .hero-card.active .hero-copy > :nth-child(4) { animation-delay: .18s; }
@keyframes v164-copy-in { from { opacity: 0; transform: translateY(12px); } }
.v164-carousel-progress {
  position: absolute;
  z-index: 8;
  left: 0;
  right: 0;
  bottom: 0;
  height: 3px;
  background: rgba(255,255,255,.14);
  overflow: hidden;
}
.v164-carousel-progress > i {
  display: block;
  width: 100%;
  height: 100%;
  background: #fff;
  transform-origin: left;
  animation: v164-progress 3s linear infinite;
}
.v164-carousel-progress.is-paused > i { animation-play-state: paused; }
@keyframes v164-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }

/* Preserve the layout; make each window feel like a coherent product console. */
.v164-visual-enhanced .main-workspace { gap: 10px; background: transparent; }
.v164-visual-enhanced .left-nav,
.v164-visual-enhanced .preview-panel,
.v164-visual-enhanced .ai-panel {
  border: 1px solid var(--v164-line);
  box-shadow: var(--v164-shadow);
}
.v164-visual-enhanced .preview-panel {
  position: relative;
  background:
    radial-gradient(circle at 90% 0%, rgba(56, 125, 193, .08), transparent 28%),
    #f8fafc !important;
}
.v164-visual-enhanced .preview-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 1px rgba(255,255,255,.85);
}
.v164-visual-enhanced .preview-head h2 {
  letter-spacing: -.035em;
  text-wrap: balance;
}
.v164-window-switching .preview-head,
.v164-window-switching .industry-main-gallery,
.v164-window-switching .catalog-grid {
  opacity: .18;
  transform: translateY(8px);
}
.v164-visual-enhanced .preview-head,
.v164-visual-enhanced .industry-main-gallery,
.v164-visual-enhanced .catalog-grid {
  transition: opacity .25s ease, transform .38s var(--v164-ease);
}

/* Larger, cleaner visual cards with controlled depth. */
.v164-visual-enhanced .company-module-grid article,
.v164-visual-enhanced .catalog-grid > *,
.v164-visual-enhanced .v160-product-card,
.v164-visual-enhanced .industry-main-gallery > * {
  position: relative;
  overflow: hidden;
  border-color: rgba(16, 45, 77, .11);
  box-shadow: 0 8px 24px rgba(13, 35, 61, .07);
  transform: translateZ(0);
  transition: transform .38s var(--v164-ease), box-shadow .38s var(--v164-ease), border-color .25s ease;
}
@media (hover:hover) and (pointer:fine) {
  .v164-visual-enhanced .company-module-grid article:hover,
  .v164-visual-enhanced .catalog-grid > *:hover,
  .v164-visual-enhanced .v160-product-card:hover,
  .v164-visual-enhanced .industry-main-gallery > *:hover {
    transform: translateY(-6px);
    border-color: rgba(22,76,134,.28);
    box-shadow: 0 22px 44px rgba(12, 37, 67, .15);
  }
}
.v164-visual-enhanced .company-module-grid img,
.v164-visual-enhanced .catalog-grid img,
.v164-visual-enhanced .v160-product-card img,
.v164-visual-enhanced .industry-main-gallery img {
  transition: transform .65s var(--v164-ease), filter .35s ease;
}
@media (hover:hover) and (pointer:fine) {
  .v164-visual-enhanced .company-module-grid article:hover img,
  .v164-visual-enhanced .catalog-grid > *:hover img,
  .v164-visual-enhanced .v160-product-card:hover img,
  .v164-visual-enhanced .industry-main-gallery > *:hover img {
    transform: scale(1.045);
    filter: contrast(1.03) saturate(1.04);
  }
}

/* Reveal only once; no perpetual decorative movement. */
.v164-reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity .62s var(--v164-ease), transform .72s var(--v164-ease);
}
.v164-reveal.is-visible { opacity: 1; transform: none; }

/* AI window feels responsive without changing its content or backend. */
.v164-visual-enhanced .ai-panel { background: rgba(255,255,255,.96); }
.v164-visual-enhanced .dialog-head {
  position: relative;
  overflow: hidden;
}
.v164-visual-enhanced .dialog-head::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(22,76,134,.34), transparent);
}
.v164-visual-enhanced .messages .msg { animation: v164-message-in .34s var(--v164-ease) both; }
@keyframes v164-message-in { from { opacity: 0; transform: translateY(8px) scale(.99); } }
.v164-visual-enhanced .input-zone:focus-within {
  border-color: rgba(22,76,134,.46);
  box-shadow: 0 0 0 4px rgba(22,76,134,.09), 0 14px 34px rgba(14,38,65,.10);
}

@media (max-width: 760px) {
  .v164-visual-enhanced .main-workspace { gap: 8px; }
  .v164-visual-enhanced .hero-card.active .hero-visual img { transform: scale(1.035); }
  .v164-visual-enhanced .company-module-grid article:hover,
  .v164-visual-enhanced .catalog-grid > *:hover { transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .v164-visual-enhanced *,
  .v164-visual-enhanced *::before,
  .v164-visual-enhanced *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .v164-reveal { opacity: 1; transform: none; }
}
