/* ==========================================================================
   Rawaa — motion layer
   Everything here is gated by html.has-motion (set by JS only when the user
   has NOT asked for reduced motion), so content is always visible without it.
   Only transform / opacity / clip-path are animated (GPU-friendly, no layout shift).
   ========================================================================== */

/* ---------- Hero art (static part: always on) ---------- */
.hero__art { position: relative; justify-self: center; width: min(100%, 440px); }
.hero__art .hero__portrait { width: 100%; }
.orb, .ring, .sparkle { position: absolute; pointer-events: none; z-index: 0; }
.hero__portrait { z-index: 1; }
.orb { border-radius: 50%; filter: blur(2px); }
.orb--1 { width: 120px; height: 120px; top: 6%; inset-inline-start: -14%; background: radial-gradient(circle at 30% 30%, #FDBA74, var(--c-orange-bright) 60%, rgb(249 115 22 / 0) 72%); opacity: 0.55; }
.orb--2 { width: 70px; height: 70px; bottom: 8%; inset-inline-end: -10%; background: radial-gradient(circle at 30% 30%, #fff, #FED7AA 55%, rgb(254 215 170 / 0) 72%); opacity: 0.9; }
.ring { border-radius: 50%; border: 2px solid rgb(249 115 22 / 0.35); }
.ring--1 { width: 150px; height: 150px; bottom: -6%; inset-inline-start: -18%; }
.ring--2 { width: 64px; height: 64px; top: -3%; inset-inline-end: 8%; border-color: rgb(15 27 45 / 0.18); border-style: dashed; }
.sparkle { fill: var(--c-orange-bright); }
.sparkle--1 { width: 26px; top: 18%; inset-inline-end: -8%; }
.sparkle--2 { width: 16px; top: 52%; inset-inline-start: -9%; fill: var(--c-navy); opacity: 0.55; }
.sparkle--3 { width: 20px; bottom: 18%; inset-inline-end: -4%; fill: #FDBA74; }

/* Gradient underline under the title (static). */
.hero__title-text {
	background-image: linear-gradient(90deg, var(--c-orange-bright), #FDBA74);
	background-repeat: no-repeat; background-position: 100% 100%; background-size: 100% 2px;
	padding-bottom: 4px;
}

/* Card image zoom + priority icon (hover, motion-safe). */
.card__media img { transition: transform 600ms var(--ease); }
.priority__icon { transition: transform 300ms var(--ease), background-color 300ms var(--ease), color 300ms var(--ease); }

@media (hover: hover) {
	.card:hover .card__media img { transform: scale(1.06); }
	.priority:hover .priority__icon { transform: translateY(-4px) rotate(-6deg); background: var(--c-orange); color: #fff; }
}

/* ======================= Animated (has-motion only) ======================= */

/* Hero entrance: staggered fade-up. */
.has-motion .anim-in { opacity: 0; transform: translateY(18px); animation: rw-fade-up 800ms var(--ease) forwards; animation-delay: calc(var(--d, 0) * 120ms + 150ms); }

/* Portrait: reveal from the bottom inside the arch, frame draws after. */
/* Starts partly visible so the LCP image is painted immediately (better Core Web Vitals). */
.has-motion .hero__portrait img { clip-path: inset(45% 0 0 0 round 999px 999px 24px 24px); animation: rw-arch-reveal 1200ms cubic-bezier(0.65, 0, 0.35, 1) 200ms forwards; }
.has-motion .hero__portrait::before { opacity: 0; transform: translate(-12px, -12px); animation: rw-frame-in 900ms var(--ease) 1000ms forwards; }

/* Title underline grows from the right (RTL start). */
.has-motion .hero__title-text { background-size: 0 2px; animation: rw-underline 900ms var(--ease) 900ms forwards; }

/* Floating ornaments. Wrapper spans carry parallax; inner animation floats. */
.has-motion .orb, .has-motion .ring, .has-motion .sparkle { opacity: 0; animation: rw-pop 700ms var(--ease) forwards, rw-float 7s ease-in-out infinite; }
.has-motion .orb--1 { animation-delay: 900ms, 900ms; --o: 0.55; }
.has-motion .orb--2 { animation-delay: 1100ms, 1600ms; animation-duration: 700ms, 9s; --o: 0.9; }
.has-motion .ring--1 { animation-delay: 1200ms, 1200ms; animation-duration: 700ms, 11s; }
.has-motion .ring--2 { animation: rw-pop 700ms var(--ease) 1300ms forwards, rw-spin 24s linear infinite; }
.has-motion .sparkle--1 { animation: rw-pop 600ms var(--ease) 1400ms forwards, rw-twinkle 3.2s ease-in-out 2s infinite; }
.has-motion .sparkle--2 { animation: rw-pop 600ms var(--ease) 1550ms forwards, rw-twinkle 4s ease-in-out 2.6s infinite; --o: 0.55; }
.has-motion .sparkle--3 { animation: rw-pop 600ms var(--ease) 1700ms forwards, rw-twinkle 3.6s ease-in-out 3s infinite; }

/* Primary CTA: a soft light sweep every few seconds. */
.btn--shine { position: relative; overflow: hidden; isolation: isolate; }
.has-motion .btn--shine::after {
	content: ""; position: absolute; inset: -20% auto -20% -40%; width: 40%; z-index: -1;
	background: linear-gradient(100deg, rgb(255 255 255 / 0) 0%, rgb(255 255 255 / 0.35) 50%, rgb(255 255 255 / 0) 100%);
	transform: skewX(-20deg) translateX(-150%); animation: rw-shine 5s ease-in-out 2.5s infinite;
}

/* Hero background glow breathes slowly. */
.has-motion .hero::before { animation: rw-breathe 10s ease-in-out infinite; }

/* Scroll reveal (classes added by JS). */
.has-motion [data-reveal] { opacity: 0; transform: translateY(28px); transition: opacity 700ms var(--ease), transform 700ms var(--ease); transition-delay: calc(var(--i, 0) * 90ms); }
.has-motion [data-reveal].is-visible { opacity: 1; transform: none; }
.has-motion .step[data-reveal] .step__n { transform: scale(0.4); transition: transform 600ms cubic-bezier(0.34, 1.56, 0.64, 1); transition-delay: calc(var(--i, 0) * 90ms + 250ms); }
.has-motion .step[data-reveal].is-visible .step__n { transform: none; }

/* Parallax targets get smooth transforms (values set by JS as CSS vars). */
.has-motion [data-depth] { translate: var(--px, 0) var(--py, 0); transition: translate 400ms cubic-bezier(0.2, 0.7, 0.2, 1); }

/* ---------- Keyframes ---------- */
@keyframes rw-fade-up { to { opacity: 1; transform: none; } }
@keyframes rw-arch-reveal { to { clip-path: inset(0 0 0 0 round 999px 999px 24px 24px); } }
@keyframes rw-frame-in { to { opacity: 1; transform: none; } }
@keyframes rw-underline { to { background-size: 100% 2px; } }
@keyframes rw-pop { from { opacity: 0; transform: scale(0.4); } to { opacity: var(--o, 1); transform: scale(1); } }
@keyframes rw-float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-14px); } }
@keyframes rw-spin { from { opacity: 1; rotate: 0deg; } to { opacity: 1; rotate: 360deg; } }
@keyframes rw-twinkle { 0%, 100% { transform: scale(1) rotate(0deg); opacity: var(--o, 1); } 50% { transform: scale(0.55) rotate(45deg); opacity: calc(var(--o, 1) * 0.5); } }
@keyframes rw-shine { 0%, 70% { transform: skewX(-20deg) translateX(-150%); } 100% { transform: skewX(-20deg) translateX(450%); } }
@keyframes rw-breathe { 0%, 100% { transform: scale(1); opacity: 1; } 50% { transform: scale(1.08); opacity: 0.8; } }

/* ---------- Small screens: fewer, calmer ornaments ---------- */
@media (max-width: 860px) {
	.hero__art { order: -1; width: min(78%, 340px); }
	.ring--1, .sparkle--2 { display: none; }
	.orb--1 { width: 80px; height: 80px; }
}

/* Belt and braces: if reduced motion is requested, show the final state. */
@media (prefers-reduced-motion: reduce) {
	.anim-in, [data-reveal], .orb, .ring, .sparkle, .hero__portrait::before { opacity: 1 !important; transform: none !important; animation: none !important; }
	.hero__portrait img { clip-path: none !important; animation: none !important; }
	.hero__title-text { background-size: 100% 2px !important; animation: none !important; }
}
