/* ==========================================================================
   TEXT OVERLAY / TAGLINE CTA WIDGET (.ato-*)
   Dedicated stylesheet for Text Overlay and Tagline CTA.
   ========================================================================== */

.elementor-widget-aidem_text_overlay.ato-layout-overlay,
.elementor-widget-aidem_tagline_cta.ato-layout-overlay {
  position: absolute !important;
  inset: 0 !important;
  width: 100% !important;
  height: 100% !important;
  pointer-events: none;
}

.elementor-widget-aidem_text_overlay.ato-layout-overlay .elementor-widget-container,
.elementor-widget-aidem_text_overlay.ato-layout-overlay .ato-widget,
.elementor-widget-aidem_tagline_cta.ato-layout-overlay .elementor-widget-container,
.elementor-widget-aidem_tagline_cta.ato-layout-overlay .ato-widget {
  width: 100%;
  height: 100%;
}

.ato-widget {
  position: relative;
  width: 100%;
  --ato-accent: #00ff88;
}

.ato-stage {
  position: relative;
  width: 100%;
  min-height: inherit;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: center;
}

.ato-positioner {
  position: relative;
  width: 100%;
  max-width: 100%;
  transform: translateY(var(--ato-offset-y, 0px));
}

.ato-content {
  position: relative;
  width: 100%;
  max-width: 100%;
  min-height: 1px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  box-sizing: border-box;
  margin-inline: auto;
}

.ato-halign-left .ato-content {
  align-items: flex-start;
  margin-inline: 0 auto;
}

.ato-halign-center .ato-content {
  align-items: center;
  margin-inline: auto;
}

.ato-halign-right .ato-content {
  align-items: flex-end;
  margin-inline: auto 0;
}

.ato-layout-overlay .ato-stage,
.ato-layout-overlay .ato-positioner,
.ato-layout-overlay .ato-content {
  min-height: 100%;
  height: 100%;
}

.ato-text {
  display: block;
  width: 100%;
  margin: 0;
  color: inherit;
  --ato-lift-color: #05070d;
  --ato-lift-opacity: 0.7;
  white-space: normal;
  overflow-wrap: anywhere;
  transition: opacity 0.25s ease;
}

.ato-strapline {
  --ato-line-gap: 8px;
  line-height: inherit;
}

.ato-tagline {
  line-height: inherit;
}

.ato-line {
  display: block;
  width: 100%;
  line-height: inherit;
  white-space: pre-wrap;
}

.ato-strapline .ato-line:not(:last-child) {
  margin-bottom: var(--ato-line-gap, 8px);
}

.ato-crt-line {
  min-height: 1em;
}

.ato-crt-cursor {
  display: inline-block;
  width: 0.55em;
  height: 1em;
  margin-left: 3px;
  vertical-align: text-bottom;
  background: var(--ato-accent, currentColor);
  animation: ato-crt-blink 0.8s step-end infinite;
}

.ato-crt-cursor--done {
  display: none !important;
}

.ato-effect-crt {
  text-shadow: 0 0 2px currentColor, 0 0 8px var(--ato-accent, currentColor);
}

.ato-decoder-char--scrambling {
  color: var(--ato-accent, currentColor);
  text-shadow: 0 0 8px var(--ato-accent, currentColor);
}

.ato-line-reveal {
  overflow: hidden;
}

.ato-line-reveal__inner {
  display: inline-block;
  transform: translateY(105%);
  opacity: 0;
  filter: blur(4px);
  transition: transform 0.8s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.8s ease, filter 0.8s ease;
}

.ato-line-reveal--visible .ato-line-reveal__inner {
  transform: translateY(0);
  opacity: 1;
  filter: blur(0);
}

.ato-effect-wordy_reveal {
  text-shadow:
    0 1px 0 rgba(0, 0, 0, 0.22),
    0 0 22px rgba(0, 0, 0, 0.16);
}

.ato-wordy-line {
  display: block;
  width: 100%;
}

.ato-wordy-word {
  display: inline-block;
  width: auto;
  max-width: 100%;
  margin: 0 0.22em 0.08em 0;
  opacity: 0;
  transform: translateY(0.9em) scale(0.96);
  filter:
    drop-shadow(0 10px 18px rgb(0 0 0 / calc(0.12 + (var(--ato-lift-opacity) * 0.22))))
    drop-shadow(0 0 calc(6px + (var(--ato-lift-opacity) * 12px)) var(--ato-lift-color));
  text-shadow:
    0 1px 0 rgb(0 0 0 / calc(0.12 + (var(--ato-lift-opacity) * 0.16))),
    0 0 calc(4px + (var(--ato-lift-opacity) * 8px)) var(--ato-lift-color),
    0 0 12px rgb(0 0 0 / calc(0.08 + (var(--ato-lift-opacity) * 0.14)));
  transition:
    opacity 0.42s ease,
    transform 0.62s cubic-bezier(0.22, 1, 0.36, 1),
    text-shadow 0.62s ease,
    filter 0.62s ease;
}

.ato-wordy-word:last-child {
  margin-right: 0;
}

.ato-wordy-word--visible {
  opacity: 1;
  transform: translateY(0) scale(1);
  filter:
    drop-shadow(0 14px 24px rgb(0 0 0 / calc(0.16 + (var(--ato-lift-opacity) * 0.26))))
    drop-shadow(0 0 calc(8px + (var(--ato-lift-opacity) * 14px)) var(--ato-lift-color));
  text-shadow:
    0 1px 0 rgb(0 0 0 / calc(0.14 + (var(--ato-lift-opacity) * 0.18))),
    0 0 calc(6px + (var(--ato-lift-opacity) * 10px)) var(--ato-lift-color),
    0 0 16px rgb(0 0 0 / calc(0.1 + (var(--ato-lift-opacity) * 0.16)));
}

.ato-btn-wrap {
  display: flex;
  justify-content: center;
  pointer-events: auto;
}

.ato-btn {
  pointer-events: auto;
}

@keyframes ato-crt-blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

@media (prefers-reduced-motion: reduce) {
  .ato-crt-cursor,
  .ato-line-reveal__inner,
  .ato-wordy-word,
  .ato-btn-wrap {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
