/* ==========================================================================
   Radmehr Law Office (radmehrlaw.ir) — Choreographed Motion System
   GPU-Composited Only (transform, opacity, clip-path, stroke-dashoffset)
   Progressive Enhancement + Fail-Safe + Reduced Motion Compliance
   ========================================================================== */

/* Hero Masked Typographic Reveal */
html.motion-ready [data-hero-line] {
  opacity: 0;
  transform: translateY(108%);
  clip-path: inset(0 0 100% 0);
  will-change: transform, opacity, clip-path;
}

html.motion-ready [data-hero-line].is-revealed {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
  transition:
    transform 820ms var(--ease-editorial),
    opacity 620ms var(--ease-editorial),
    clip-path 820ms var(--ease-editorial);
}

html.motion-ready [data-hero-fade] {
  opacity: 0;
  transform: translateY(18px);
  will-change: transform, opacity;
}

html.motion-ready [data-hero-fade].is-revealed {
  opacity: 1;
  transform: translateY(0);
  transition:
    transform 720ms var(--ease-editorial),
    opacity 640ms var(--ease-editorial);
}

/* Structural Bronze Hairline Draws (Horizontal RTL & Vertical Split Axis) */
html.motion-ready [data-draw-line] {
  transform: scaleX(0);
  transform-origin: right center;
  will-change: transform;
}

html.motion-ready [data-draw-line].is-revealed {
  transform: scaleX(1);
  transition: transform 900ms var(--ease-editorial);
}

html.motion-ready [data-draw-vertical] {
  transform: scaleY(0);
  transform-origin: center top;
  will-change: transform;
}

html.motion-ready [data-draw-vertical].is-revealed {
  transform: scaleY(1);
  transition: transform 1050ms var(--ease-editorial);
}

/* Scroll-Triggered Staggered Section & Column Reveals */
html.motion-ready [data-reveal] {
  opacity: 0;
  transform: translateY(24px);
  will-change: transform, opacity;
}

html.motion-ready [data-reveal="clip"] {
  opacity: 0;
  transform: translateY(16px);
  clip-path: inset(0 0 14% 0);
  will-change: transform, opacity, clip-path;
}

html.motion-ready [data-reveal].is-revealed {
  opacity: 1;
  transform: translateY(0);
  clip-path: inset(0 0 0 0);
  transition:
    transform 760ms var(--ease-editorial),
    opacity 640ms var(--ease-editorial),
    clip-path 760ms var(--ease-editorial);
}

/* Architectural Legal Monograph Frame Reveal */
html.motion-ready .monograph-frame[data-hero-emblem] {
  opacity: 0;
  transform: translateY(20px) scale(0.985);
  will-change: transform, opacity;
}

html.motion-ready .monograph-frame[data-hero-emblem].is-revealed {
  opacity: 1;
  transform: translateY(0) scale(1);
  transition:
    transform 920ms var(--ease-editorial),
    opacity 720ms var(--ease-editorial);
}

/* Mobile Drawer Staggered Link Entrance */
.mobile-drawer .mobile-drawer__link {
  opacity: 0;
  transform: translateX(16px);
  transition:
    opacity 380ms var(--ease-editorial),
    transform 420ms var(--ease-editorial),
    color var(--dur-fast) ease;
}

.mobile-drawer.is-open .mobile-drawer__link {
  opacity: 1;
  transform: translateX(0);
}

.mobile-drawer.is-open .mobile-drawer__link:nth-child(1) {
  transition-delay: 80ms;
}

.mobile-drawer.is-open .mobile-drawer__link:nth-child(2) {
  transition-delay: 130ms;
}

.mobile-drawer.is-open .mobile-drawer__link:nth-child(3) {
  transition-delay: 180ms;
}

.mobile-drawer.is-open .mobile-drawer__link:nth-child(4) {
  transition-delay: 230ms;
}

.mobile-drawer.is-open .mobile-drawer__link:nth-child(5) {
  transition-delay: 280ms;
}

/* Magnetic Button Compositor Hint */
[data-magnetic] {
  will-change: transform;
}

/* Reduced Motion Respect (Zero Hidden Content, Zero Motion Sickness) */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  html.motion-ready [data-hero-line],
  html.motion-ready [data-hero-fade],
  html.motion-ready [data-draw-line],
  html.motion-ready [data-draw-vertical],
  html.motion-ready [data-reveal],
  html.motion-ready .monograph-frame[data-hero-emblem],
  .mobile-drawer .mobile-drawer__link {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
    will-change: auto;
  }
}
