/* Reen Coders — floating hero image v3
   Keeps the clean, frameless artwork. Desktop has an explicit animation rule.
   Reduced-motion systems use a smaller/slower float instead of disabling it entirely. */
.hero .hero-art {
  position: relative !important;
  isolation: isolate;
  display: grid !important;
  place-items: center !important;
  height: clamp(300px, 36vw, 500px) !important;
  min-height: 300px !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  overflow: visible !important;
}

.hero .hero-art::before {
  content: "";
  position: absolute;
  z-index: -1;
  inset: 13% 10%;
  border: 0;
  border-radius: 50%;
  background: radial-gradient(ellipse at center,
    color-mix(in srgb, var(--primary) 22%, transparent),
    color-mix(in srgb, #32c6e8 10%, transparent) 45%,
    transparent 72%);
  filter: blur(24px);
  pointer-events: none;
}

.hero .hero-art > img.hero-custom-image {
  display: block !important;
  position: relative !important;
  z-index: 1;
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  max-height: none !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  outline: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  object-fit: contain !important;
  object-position: center !important;
  transform-origin: center center;
  animation: reen-hero-float-desktop 3.8s ease-in-out infinite !important;
  will-change: transform;
}

/* Dedicated desktop rule, so desktop breakpoints cannot inherit a static image rule. */
@media (min-width: 821px) {
  .hero .hero-art > img.hero-custom-image {
    animation-name: reen-hero-float-desktop !important;
    animation-duration: 3.8s !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
  }
}

@keyframes reen-hero-float-desktop {
  0%, 100% { transform: translate3d(0, 0, 0) rotate(0deg); }
  50% { transform: translate3d(0, -18px, 0) rotate(.45deg); }
}

@keyframes reen-hero-float-reduced {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -6px, 0); }
}

@media (max-width: 820px) {
  .hero .hero-art {
    height: clamp(250px, 67vw, 360px) !important;
    min-height: 250px !important;
    max-height: 360px !important;
  }
  .hero .hero-art::before { inset: 15% 12%; filter: blur(18px); }
  .hero .hero-art > img.hero-custom-image {
    animation-name: reen-hero-float-desktop !important;
    animation-duration: 4.8s !important;
  }
}

@media (max-width: 420px) {
  .hero .hero-art { height: 245px !important; min-height: 245px !important; }
}

/* Reduced-motion preference gets a slower, shorter float rather than no float.
   This overrides broad app.css rules that disable every animation. */
@media (prefers-reduced-motion: reduce) {
  .hero .hero-art > img.hero-custom-image {
    animation-name: reen-hero-float-reduced !important;
    animation-duration: 7s !important;
    animation-timing-function: ease-in-out !important;
    animation-iteration-count: infinite !important;
    will-change: transform;
  }
}

/* Reen Coders — premium legal-page hero graphics enhancement.
   Appended to hero-floating.css so the homepage's existing floating image stays intact. */
.legal-hero {
  background:
    radial-gradient(ellipse at 84% 10%, rgba(137, 104, 255, .30), transparent 36%),
    radial-gradient(ellipse at 74% 96%, rgba(52, 202, 224, .19), transparent 34%),
    linear-gradient(128deg, color-mix(in srgb, var(--surface) 94%, #10182d), color-mix(in srgb, var(--surface) 80%, #29205a)) !important;
}

/* The grid was behind the hero surface and heavily faded. Raise its contrast and animate it subtly. */
.legal-hero::after {
  z-index: 0 !important;
  opacity: .38 !important;
  background-image:
    linear-gradient(to right, rgba(151, 132, 255, .30) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(151, 132, 255, .30) 1px, transparent 1px) !important;
  background-size: 28px 28px !important;
  mask-image: linear-gradient(100deg, rgba(0,0,0,.18), #000 48%, #000 100%) !important;
  animation: reen-legal-grid-drift 24s linear infinite !important;
}

/* Main floating glass tile, placed in the visual area to the right of the text. */
.legal-hero::before {
  content: "";
  position: absolute;
  z-index: 1;
  top: 43%;
  right: clamp(190px, 20%, 285px);
  width: 68px;
  height: 68px;
  pointer-events: none;
  border: 1px solid rgba(181, 160, 255, .85);
  border-radius: 17px;
  background:
    linear-gradient(135deg, rgba(175, 153, 255, .24), rgba(93, 68, 194, .05)),
    repeating-linear-gradient(0deg, transparent 0 11px, rgba(183, 166, 255, .13) 11px 12px),
    repeating-linear-gradient(90deg, transparent 0 11px, rgba(183, 166, 255, .13) 11px 12px);
  box-shadow:
    0 0 0 8px rgba(142, 110, 255, .06),
    0 18px 46px rgba(112, 78, 255, .24),
    inset 0 0 24px rgba(172, 150, 255, .12);
  transform: rotate(18deg);
  animation: reen-legal-square-float 7.4s ease-in-out infinite;
}

/* Extra animated tiles grow out of the existing decorative orbs. */
.legal-hero-orb-one,
.legal-hero-orb-two { opacity: .82 !important; }

.legal-hero-orb-one::before,
.legal-hero-orb-one::after,
.legal-hero-orb-two::before {
  content: "";
  position: absolute;
  display: block;
  pointer-events: none;
  border: 1px solid rgba(153, 130, 255, .82);
  border-radius: 13px;
  background: linear-gradient(145deg, rgba(149, 125, 255, .24), rgba(79, 64, 160, .06));
  box-shadow: 0 12px 34px rgba(101, 76, 237, .20), inset 0 0 18px rgba(188, 174, 255, .10);
}

.legal-hero-orb-one::before {
  width: 47px;
  height: 47px;
  left: -54px;
  top: 128px;
  transform: rotate(-16deg);
  animation: reen-legal-square-float 8.8s ease-in-out -2s infinite;
}

.legal-hero-orb-one::after {
  width: 20px;
  height: 20px;
  left: -105px;
  top: 173px;
  border-radius: 6px;
  border-color: rgba(104, 228, 239, .85);
  background: linear-gradient(145deg, rgba(104, 228, 239, .30), rgba(104, 228, 239, .04));
  box-shadow: 0 0 24px rgba(66, 208, 229, .26);
  animation: reen-legal-square-twinkle 4.6s ease-in-out -1s infinite;
}

.legal-hero-orb-two::before {
  width: 34px;
  height: 34px;
  left: -45px;
  top: -81px;
  border-radius: 10px;
  border-color: rgba(111, 222, 240, .78);
  background: linear-gradient(145deg, rgba(111, 222, 240, .28), rgba(68, 173, 196, .04));
  box-shadow: 0 12px 30px rgba(45, 190, 214, .15), inset 0 0 14px rgba(180, 248, 255, .10);
  animation: reen-legal-square-float 6.8s ease-in-out -3s infinite;
}

.legal-hero-symbol {
  box-shadow:
    0 25px 65px rgba(99, 70, 238, .22),
    0 0 0 9px rgba(140, 116, 255, .035),
    inset 0 0 28px rgba(160, 139, 255, .07) !important;
  backdrop-filter: blur(8px);
}

.legal-hero-symbol span {
  filter: drop-shadow(0 0 17px rgba(151, 118, 255, .68));
  animation: reen-legal-star-pulse 4.2s ease-in-out infinite;
}

.legal-hero-content {
  animation: reen-legal-copy-in .75s cubic-bezier(.2,.7,.2,1) both;
}

@keyframes reen-legal-grid-drift {
  from { background-position: 0 0, 0 0; }
  to { background-position: 28px 28px, 28px 28px; }
}

@keyframes reen-legal-square-float {
  0%, 100% { translate: 0 0; rotate: 0deg; }
  50% { translate: 0 -13px; rotate: 8deg; }
}

@keyframes reen-legal-square-twinkle {
  0%, 100% { opacity: .48; transform: translateY(0) rotate(0deg) scale(.94); }
  50% { opacity: 1; transform: translateY(-8px) rotate(18deg) scale(1.08); }
}

@keyframes reen-legal-star-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(1.10); }
}

@keyframes reen-legal-copy-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 760px) {
  .legal-hero::after { opacity: .30 !important; background-size: 22px 22px !important; }
  .legal-hero::before {
    top: auto;
    right: 88px;
    bottom: 26px;
    width: 42px;
    height: 42px;
    border-radius: 12px;
    opacity: .72;
  }
  .legal-hero-orb-one::before { left: -12px; top: 185px; width: 34px; height: 34px; border-radius: 10px; }
  .legal-hero-orb-one::after { left: -47px; top: 218px; width: 15px; height: 15px; }
  .legal-hero-orb-two::before { left: -28px; top: -52px; width: 25px; height: 25px; border-radius: 8px; }
  .legal-hero-symbol { backdrop-filter: none; }
}

@media (max-width: 440px) {
  .legal-hero::before { right: 78px; bottom: 18px; width: 34px; height: 34px; }
  .legal-hero-orb-one::before { top: 200px; }
  .legal-hero-orb-one::after { top: 232px; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero::after,
  .legal-hero::before,
  .legal-hero-orb-one::before,
  .legal-hero-orb-one::after,
  .legal-hero-orb-two::before,
  .legal-hero-symbol span,
  .legal-hero-content { animation: none !important; }
}

/* Reen Coders — clean legal hero: no grid, tiles, or square frame. */
.legal-hero {
  background:
    radial-gradient(ellipse at 83% 8%, rgba(133, 96, 255, .24), transparent 35%),
    radial-gradient(ellipse at 72% 100%, rgba(42, 190, 218, .13), transparent 32%),
    var(--surface, #11121d) !important;
  border: 1px solid var(--line, rgba(148, 140, 180, .22)) !important;
  box-shadow: 0 24px 72px rgba(0, 0, 0, .16) !important;
}

/* Remove the grid texture and large decorative square. */
.legal-hero::after,
.legal-hero::before {
  content: none !important;
  display: none !important;
  background: none !important;
  animation: none !important;
}

/* Remove all small glass-square accents generated by orb pseudo-elements. */
.legal-hero-orb-one::before,
.legal-hero-orb-one::after,
.legal-hero-orb-two::before {
  content: none !important;
  display: none !important;
  background: none !important;
  box-shadow: none !important;
  animation: none !important;
}

/* Keep a transparent star-and-ring motif—no square card behind it. */
.legal-hero-symbol {
  border: 0 !important;
  border-radius: 0 !important;
  background: transparent !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  transform: none !important;
  animation: none !important;
}

.legal-hero-symbol span {
  color: var(--primary, #8b70ff) !important;
  text-shadow:
    0 0 18px rgba(143, 111, 255, .75),
    0 0 44px rgba(143, 111, 255, .34) !important;
  animation: reen-legal-star-pulse 4.4s ease-in-out infinite !important;
}

.legal-hero-symbol i,
.legal-hero-symbol b {
  border-color: color-mix(in srgb, var(--primary, #8b70ff) 38%, transparent) !important;
  background: transparent !important;
  box-shadow: none !important;
}

/* A quieter, balanced presentation on small screens. */
@media (max-width: 760px) {
  .legal-hero {
    background:
      radial-gradient(ellipse at 92% 4%, rgba(133, 96, 255, .18), transparent 31%),
      radial-gradient(ellipse at 65% 100%, rgba(42, 190, 218, .10), transparent 30%),
      var(--surface, #11121d) !important;
  }
  .legal-hero-symbol { opacity: .22 !important; }
}

@media (prefers-reduced-motion: reduce) {
  .legal-hero-symbol span { animation: none !important; }
}
