:root {
  --tensung-scroll-progress: 0;
  --tensung-logo-scale: 1;
  --tensung-tag-opacity: 1;
  --tensung-tag-offset: 0px;
}

.tensung-scroll-progress {
  position: fixed;
  z-index: 9990;
  inset: 0 auto auto 0;
  width: 100%;
  height: 3px;
  transform-origin: 0 50%;
  transform: scaleX(var(--tensung-scroll-progress, 0));
  background: #B35F1B;
  pointer-events: none;
  will-change: transform;
}

/* The source header remains in view while its compact state follows scroll. */
.xpro-theme-builder-header {
  position: sticky;
  top: 0;
  z-index: 90;
  transition: box-shadow .38s cubic-bezier(.22, .61, .36, 1);
}

body.admin-bar .xpro-theme-builder-header {
  top: 32px;
}

.xpro-theme-builder-header.tensung-is-scrolled {
  box-shadow: 0 10px 28px rgba(10, 32, 25, .10);
}

/* Sticky positioning must live on the XPRO header wrapper, not its one-row Elementor child. */
.xpro-theme-builder-header .elementor-element-header01 {
  position: relative;
  top: auto;
  z-index: auto;
}

/* These are existing XPRO widgets, kept fully editable in the template library. */
.elementor-element-hlogo001 {
  transform: scale(var(--tensung-logo-scale, 1)) !important;
  transform-origin: center center;
  will-change: transform;
}

.elementor-element-htag001 {
  opacity: var(--tensung-tag-opacity, 1);
  transform: translateY(var(--tensung-tag-offset, 0px));
  transition: opacity .18s linear, transform .18s linear;
  will-change: opacity, transform;
}

/* XPRO adds 5px title margins by default; the source lock-up has a 5px logo-to-tag gap in total. */
13px2

.elementor-element-htag001 .xpro-simple-heading-wrapper {
  line-height: 0;
}

.elementor-element-htag001 .xpro-simple-heading-wrapper .xpro-heading-title {
  margin: 0 !important;
}

/* Match the source navigation's page state without making the XPRO menu
   static. The script assigns this class from the current WordPress URL. */
html body .xpro-theme-builder-header .elementor-element-hnavroot .xpro-elementor-nav-link.tensung-nav-current {
  color: #fff !important;
  box-shadow: inset 0 -3px 0 #B35F1B;
}

@media (max-width: 782px) {
  body.admin-bar .xpro-theme-builder-header {
    top: 46px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .tensung-scroll-progress,
  .xpro-theme-builder-header,
  .elementor-element-hlogo001,
  .elementor-element-htag001 {
    transition: none !important;
  }
}
