/* Local prototype polish: the photograph moves; copy and layout stay still. */
body.home:not(.elementor-editor-active) .elementor .mkh-hero {
  isolation: isolate;
}

@media (min-width: 901px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body.home:not(.elementor-editor-active) .elementor .mkh-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-image: inherit;
    background-position: center center;
    background-repeat: no-repeat;
    background-size: cover;
    transform-origin: center center;
    transform: scale(1);
    animation: mkh-hero-settle 14s cubic-bezier(.18,.45,.3,1) 1 both;
  }

  /* Elementor already owns ::before as the dark, static readability overlay. */
  body.home:not(.elementor-editor-active) .elementor .mkh-hero::before {
    z-index: 1;
  }

  body.home:not(.elementor-editor-active) .elementor .mkh-hero > .e-con-inner {
    position: relative;
    z-index: 2;
  }
}

@keyframes mkh-hero-settle {
  from { transform: scale(1.035); }
  to { transform: scale(1); }
}

/* Reserve the accent area in CSS before the first paint, never during reveal. */
body:not(.elementor-editor-active) main .mkh-section:not(.mkh-hero) h2.elementor-heading-title {
  position: relative;
  padding-bottom: 18px;
}

body:not(.elementor-editor-active) main .mkh-section:not(.mkh-hero) h2.elementor-heading-title::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: 0;
  width: 64px;
  max-width: 100%;
  height: 3px;
  border-radius: 2px;
  background: var(--mkh-yellow, #febf19);
  pointer-events: none;
  transform: scaleX(1);
  transform-origin: left center;
}

/* Reuse the existing one-time section reveal instead of observing headings. */
@media (min-width: 901px) and (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  body:not(.elementor-editor-active) main .mkh-section-pending h2.elementor-heading-title::after {
    transform: scaleX(0);
    transition: none;
  }

  body:not(.elementor-editor-active) main .mkh-section-visible h2.elementor-heading-title::after {
    transform: scaleX(1);
    transition: transform .55s cubic-bezier(.2,.65,.3,1);
  }

  body:not(.elementor-editor-active) main .mkh-section-instant h2.elementor-heading-title::after {
    transform: scaleX(1);
    transition: none;
  }
}

.mkh-header {
  box-shadow: 0 0 0 transparent;
  transition: box-shadow .22s ease;
}

.mkh-header.mkh-header-scrolled {
  box-shadow: 0 7px 24px #20426c17;
}

/* Switching preference/breakpoint does not replay the hero in this visit. */
body.mkh-motion-static.home .elementor .mkh-hero::after {
  animation: none !important;
  transform: none !important;
}

@media (max-width: 900px), (hover: none), (prefers-reduced-motion: reduce) {
  body.home .elementor .mkh-hero::after {
    content: none;
    animation: none !important;
    transform: none !important;
  }

  body main .mkh-section h2.elementor-heading-title::after {
    transform: scaleX(1) !important;
    transition: none !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .mkh-header { transition: none; }
}
