/* ElmamSoft production finishing layer — 2026-11-07.
 * Intention: genuine calm floating product imagery, no repeated opacity reveals.
 * All functional handlers, Cloudflare endpoints, and brand assets remain unchanged.
 */

/* Information must remain legible when intersection observers are delayed or JS is unavailable.
 * This also avoids repeated fade-in or sudden pop-in as visitors scroll. */
.reveal, .reveal.is-visible {
  opacity:1;
  transform:none;
  transition-property:background-color,border-color,box-shadow;
}

/* Keep the exact original logos and authentic product screens; only float the device frame.
 * Remove legacy one-shot opacity fades that were perceived as flashing. */
@media (prefers-reduced-motion: no-preference) {
  .premium-stage1 .premium-home-copy,
  .premium-stage1 .premium-product-copy,
  .premium-stage1 .premium-home-stage,
  .premium-stage1 .premium-product-stage,
  .premium-stage2:not(.premium-stage1) .inner-copy h1,
  .premium-stage2:not(.premium-stage1) .inner-visual {
    animation:none;
    opacity:1;
  }
}

/* Disable rapid blinking, glowing pulse and animated pseudo-code on the assistant.
 * The mascot may gently float as one object; its internal elements stay steady. */
.ai-launch .era-mini-visor::before,
.ai-launch .era-mini-visor::after,
.ai-launch .era-mini-core,
.ai-launch .era-mini-screen i {animation:none!important}
@media (prefers-reduced-motion:no-preference){
  .ai-launch > .era-mini-stage {animation-duration:9s;}
  .premium-stage1 .calm-scene-laptop,
  .premium-stage1 .calm-scene-phone,
  .premium-stage1 .premium-story-card .calm-floating-phone > img,
  .premium-stage1 .premium-clinic-stage,
  .premium-stage2 .calm-inline-image {backface-visibility:hidden;will-change:transform;}
}
@media (prefers-reduced-motion:reduce){
  .reveal,.reveal.is-visible{transition:none!important}
  .premium-stage1 .premium-home-copy,
  .premium-stage1 .premium-product-copy,
  .premium-stage1 .premium-home-stage,
  .premium-stage1 .premium-product-stage,
  .premium-stage2:not(.premium-stage1) .inner-copy h1,
  .premium-stage2:not(.premium-stage1) .inner-visual {animation:none!important;opacity:1!important}
  .ai-launch > .era-mini-stage{animation:none!important}
}

/* Anchored headings must not disappear underneath the sticky site header. */
html {scroll-padding-top:clamp(82px,9vw,122px)}
[id^="s2-chapter-"], #screens, #elmam-flow, #elmam-clinic {scroll-margin-top:110px}

/* Clear visible keyboard focus on all templates, including older policy/contact pages. */
a:focus-visible,button:focus-visible,input:focus-visible,
select:focus-visible,textarea:focus-visible,[tabindex]:focus-visible {
  outline:3px solid #ba8612;
  outline-offset:3px;
}

/* Keep product cutouts crisp without painted rectangles around their edges. */
.premium-stage1 .calm-floating-scene img,
.premium-stage1 .calm-floating-phone img,
.premium-stage2 .calm-transparent-media img {
  background:transparent;
  image-rendering:auto;
}

/* Preserve unobstructed CTA on narrow screens when the advisor is docked. */
@media (max-width:420px){
  .premium-stage2 .ai-launch{inset-block-end:max(8px,env(safe-area-inset-bottom));}
}
