/*
 * RESURECZION DIGITAL — layered carbon, moving orange light and a technical grid.
 * Load after digital.css. No extra markup is required.
 * Toggle .rd-atmosphere-active on each visible section to run its animation.
 * Without that class, the background is visible and its animation is paused.
 */
body.rz-digital .rd-hero,
body.rz-digital .rd-process,
body.rz-digital .rd-contact-section {
  position: relative;
  isolation: isolate;
  --rd-atmosphere-duration: 16s;
}

/* Keep the section itself unclipped: the process heading remains sticky and
 * keyboard outlines remain visible. Every animated layer stays inside it. */
body.rz-digital .rd-hero::before,
body.rz-digital .rd-hero::after,
body.rz-digital .rd-process::before,
body.rz-digital .rd-process::after,
body.rz-digital .rd-contact-section::before,
body.rz-digital .rd-contact-section::after {
  content: "";
  position: absolute;
  inset: 38px;
  pointer-events: none;
  background-repeat: no-repeat;
  transform: none;
}

body.rz-digital .rd-hero::before,
body.rz-digital .rd-process::before,
body.rz-digital .rd-contact-section::before {
  z-index: -2;
  opacity: .9;
  /* The ellipse reaches zero alpha at every edge, so the inset never reads as
   * a rectangular panel. Its broad opaque center preserves the orange light. */
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 60%, rgba(0,0,0,.96) 72%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 60%, rgba(0,0,0,.96) 72%, transparent 100%);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

body.rz-digital .rd-hero::after,
body.rz-digital .rd-process::after,
body.rz-digital .rd-contact-section::after {
  z-index: -1;
  opacity: .78;
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
}

/* Broad light sits behind the interface study, leaving the copy calm. */
body.rz-digital .rd-hero::before {
  background-image:
    radial-gradient(ellipse at 76% 40%, rgba(242,92,6,.44), rgba(133,52,15,.21) 31%, transparent 68%),
    radial-gradient(ellipse at 54% 76%, rgba(255,133,59,.16), transparent 51%),
    radial-gradient(ellipse at 14% 88%, rgba(242,92,6,.09), transparent 47%);
}

body.rz-digital .rd-hero::after {
  background-image:
    linear-gradient(90deg, transparent, rgba(255,133,59,.94), transparent),
    linear-gradient(180deg, transparent, rgba(242,92,6,.78), transparent),
    linear-gradient(rgba(220,215,207,.08) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,215,207,.08) 1px, transparent 1px);
  background-size: 46% 1px, 1px 56%, 80px 80px, 80px 80px;
  background-position: 82% 26%, 78% 42%, center, center;
  background-repeat: no-repeat, no-repeat, repeat, repeat;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 38%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 38%, transparent 100%);
}

body.rz-digital .rd-process {
  --rd-atmosphere-duration: 18s;
}

body.rz-digital .rd-process::before {
  background-image:
    radial-gradient(ellipse at 23% 57%, rgba(242,92,6,.26), rgba(103,43,16,.10) 38%, transparent 70%),
    radial-gradient(ellipse at 76% 24%, rgba(255,133,59,.075), transparent 53%);
}

body.rz-digital .rd-process::after {
  background-image:
    linear-gradient(90deg, transparent, rgba(255,133,59,.72), transparent),
    linear-gradient(rgba(220,215,207,.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,215,207,.055) 1px, transparent 1px);
  background-size: 45% 1px, 88px 88px, 88px 88px;
  background-position: 17% 72%, left center, left center;
  background-repeat: no-repeat, repeat, repeat;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 25%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 25%, transparent 100%);
}

body.rz-digital .rd-contact-section {
  --rd-atmosphere-duration: 17s;
}

body.rz-digital .rd-contact-section::before {
  background-image:
    radial-gradient(ellipse at 31% 75%, rgba(242,92,6,.29), rgba(133,52,11,.10) 37%, transparent 67%),
    radial-gradient(ellipse at 82% 23%, rgba(255,133,59,.10), transparent 47%);
}

body.rz-digital .rd-contact-section::after {
  background-image:
    linear-gradient(180deg, transparent, rgba(255,133,59,.75), transparent),
    linear-gradient(rgba(220,215,207,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(220,215,207,.05) 1px, transparent 1px);
  background-size: 1px 61%, 96px 96px, 96px 96px;
  background-position: 45% 50%, left bottom, left bottom;
  background-repeat: no-repeat, repeat, repeat;
  -webkit-mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 24%, transparent 100%);
  mask-image: radial-gradient(ellipse closest-side at 50% 50%, #000 24%, transparent 100%);
}

@media (prefers-reduced-motion: no-preference) {
  body.rz-digital .rd-hero::before,
  body.rz-digital .rd-process::before,
  body.rz-digital .rd-contact-section::before {
    animation: rd-atmosphere-drift var(--rd-atmosphere-duration) ease-in-out infinite alternate;
    animation-play-state: paused;
  }

  body.rz-digital .rd-hero::after,
  body.rz-digital .rd-process::after,
  body.rz-digital .rd-contact-section::after {
    animation: rd-atmosphere-light 14s ease-in-out infinite alternate;
    animation-play-state: paused;
  }

  body.rz-digital .rd-atmosphere-active::before,
  body.rz-digital .rd-atmosphere-active::after {
    animation-play-state: running;
  }

  @keyframes rd-atmosphere-drift {
    from { transform: translate3d(-14px, 10px, 0); opacity: .64; }
    to { transform: translate3d(18px, -16px, 0); opacity: 1; }
  }

  @keyframes rd-atmosphere-light {
    from { transform: translate3d(14px, -12px, 0); opacity: .48; }
    to { transform: translate3d(-12px, 10px, 0); opacity: .9; }
  }
}

/* On small/touch screens keep just one softly lit surface per section.
 * A single line in the hero shares the glow's layer: no animated grid and no
 * extra phone/preview transforms. The movement spans 19px over fourteen seconds. */
@media (max-width: 900px), (pointer: coarse) {
  body.rz-digital .rd-hero::after,
  body.rz-digital .rd-process::after,
  body.rz-digital .rd-contact-section::after {
    display: none;
  }

  body.rz-digital .rd-hero::before,
  body.rz-digital .rd-process::before,
  body.rz-digital .rd-contact-section::before {
    inset: 20px;
  }

  body.rz-digital .rd-hero::before {
    background-image:
      linear-gradient(90deg, transparent, rgba(255,133,59,.7), transparent),
      radial-gradient(ellipse at 76% 58%, rgba(242,92,6,.37), rgba(112,45,14,.14) 34%, transparent 72%);
    background-size: 64% 1px, auto;
    background-position: 65% 74%, center;
  }

  body.rz-digital .rd-process::before {
    background-image: radial-gradient(ellipse at 30% 53%, rgba(242,92,6,.24), rgba(103,43,16,.08) 36%, transparent 72%);
  }

  body.rz-digital .rd-contact-section::before {
    background-image: radial-gradient(ellipse at 28% 35%, rgba(242,92,6,.25), rgba(103,43,16,.07) 33%, transparent 69%);
  }
}

@media (max-width: 900px) and (prefers-reduced-motion: no-preference),
       (pointer: coarse) and (prefers-reduced-motion: no-preference) {
  body.rz-digital .rd-hero::before,
  body.rz-digital .rd-process::before,
  body.rz-digital .rd-contact-section::before {
    animation-name: rd-atmosphere-mobile;
    animation-duration: 14s;
  }

  @keyframes rd-atmosphere-mobile {
    from { transform: translate3d(-9px, 6px, 0); opacity: .64; }
    to { transform: translate3d(10px, -9px, 0); opacity: 1; }
  }
}

@media (prefers-reduced-motion: reduce) {
  body.rz-digital .rd-hero::before,
  body.rz-digital .rd-hero::after,
  body.rz-digital .rd-process::before,
  body.rz-digital .rd-process::after,
  body.rz-digital .rd-contact-section::before,
  body.rz-digital .rd-contact-section::after {
    animation: none !important;
    transform: none;
  }
}

@media (forced-colors: active) {
  body.rz-digital .rd-hero::before,
  body.rz-digital .rd-hero::after,
  body.rz-digital .rd-process::before,
  body.rz-digital .rd-process::after,
  body.rz-digital .rd-contact-section::before,
  body.rz-digital .rd-contact-section::after {
    display: none;
  }
}
