/* Motion graphics. Everything here is switched on by motion-fx.js (class "fx" on <html>),
   which stays off for visitors who prefer reduced motion. */

/* Homepage About block */
.about-row .about-icon, .about-row .about-arrow { transition: background-color 0.3s, color 0.3s, transform 0.35s var(--ease); }
.about-row:hover .about-icon { background: var(--ink); color: var(--gold); }
.about-row:hover .about-arrow { transform: translateX(6px); }
.fx .about-inset { animation: float 6s ease-in-out infinite alternate; }
@keyframes float { to { translate: 0 -14px; } }

/* Why choose: picture cards */
.why-card { overflow: hidden; border-radius: 1.75rem; background: #fff; border: 1px solid var(--line); transition: box-shadow 0.45s var(--ease), border-color 0.3s; }
.why-card:hover { box-shadow: 0 30px 55px -34px rgba(11, 20, 36, 0.45); border-color: var(--gold); }
.why-media { height: 10.5rem; overflow: hidden; background: var(--ink); }
.why-media img { width: 100%; height: 100%; object-fit: cover; transition: transform 1s var(--ease); }
.why-card:hover .why-media img { transform: scale(1.12); }
.why-icon { position: absolute; top: -1.6rem; left: 1.25rem; display: inline-flex; align-items: center; justify-content: center; width: 3.2rem; height: 3.2rem; border-radius: 1rem; background: var(--ink); color: var(--gold); border: 4px solid #fff; transition: background-color 0.3s, color 0.3s, rotate 0.45s var(--ease); }
.why-card:hover .why-icon { background: var(--gold); color: var(--ink); rotate: -8deg; }
.why-lead.tile::after { background: linear-gradient(180deg, rgba(11, 20, 36, 0.1) 20%, rgba(11, 20, 36, 0.94) 85%); }

/* Headline word masks */
.wm { display: inline-block; overflow: hidden; vertical-align: bottom; padding: 0 0.04em 0.14em; margin: 0 -0.04em -0.14em; }
.wi { display: inline-block; transform-origin: 0 100%; will-change: transform; }

/* Slow camera drift on large pictures, plus room for parallax */
.fx .parallax { scale: 1.12; will-change: translate; }
.fx .hero-media img.parallax { animation: drift 22s ease-in-out infinite alternate; }
@keyframes drift { from { scale: 1.1; } to { scale: 1.2; } }

/* Scroll progress in the floating header */
.progress { position: absolute; left: 1.75rem; right: 1.75rem; bottom: -1px; height: 2px; overflow: hidden; pointer-events: none; }
.progress i { display: block; height: 100%; background: var(--gold); transform: scaleX(0); transform-origin: left; }

/* Project ticker */
.ticker { overflow: hidden; padding: 1.6rem 0 0; -webkit-mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); mask-image: linear-gradient(90deg, transparent, #000 12%, #000 88%, transparent); }
.ticker-track { display: flex; width: max-content; animation: ticker 36s linear infinite; }
.ticker-track > div { display: flex; align-items: center; }
.ticker span { font-size: clamp(1.5rem, 3vw, 2.5rem); font-weight: 600; letter-spacing: -0.035em; white-space: nowrap; color: var(--ink); opacity: 0.28; }
.ticker i { width: 0.55rem; height: 0.55rem; margin: 0 2rem; border-radius: 2px; background: var(--gold); animation: turn 5s linear infinite; }
.ticker:hover .ticker-track { animation-play-state: paused; }
@keyframes ticker { to { transform: translateX(-50%); } }
@keyframes turn { to { rotate: 360deg; } }

/* Blueprint skyline and crane */
.skyline { display: block; width: 100%; height: auto; fill: none; stroke: var(--gold); stroke-width: 1.2; stroke-linejoin: round; }
.skyline .win { fill: var(--gold); stroke: none; opacity: 0; }
.skyline .hoist { opacity: 0; transition: opacity 0.6s 1.8s; }
.is-built .skyline .hoist { opacity: 1; animation: hoist 5.5s ease-in-out 2s infinite alternate; }
@keyframes hoist { 0% { transform: translate(0, 0); } 45% { transform: translate(0, 34px); } 70% { transform: translate(42px, 34px); } 100% { transform: translate(42px, -6px); } }
.skyline-strip { max-width: 58rem; margin: 0 auto -0.5rem; padding-top: 1rem; opacity: 0.55; }
.has-skyline { position: relative; isolation: isolate; overflow: hidden; }
.skyline-card { position: absolute; z-index: -1; top: 0; right: -4%; width: 82%; max-width: 30rem; opacity: 0.6; pointer-events: none; }

/* Pointer spotlight */
.spot { position: relative; }
.spot::before {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none; opacity: 0; z-index: 1;
  background: radial-gradient(20rem circle at var(--mx, 50%) var(--my, 50%), rgba(213, 170, 69, 0.16), transparent 65%);
  transition: opacity 0.35s;
}
.spot:hover::before { opacity: 1; }
.project-card.spot::before { border-radius: 1.75rem; }

/* WhatsApp button pulse, chip dot blink */
.fx a[aria-label="Chat with AJWA BURJ on WhatsApp"]::after {
  content: ""; position: absolute; inset: 0; border-radius: 999px; border: 2px solid #25d366; animation: ping 2.4s cubic-bezier(0.2, 0.6, 0.3, 1) infinite;
}
@keyframes ping { from { transform: scale(1); opacity: 0.8; } 70%, to { transform: scale(1.65); opacity: 0; } }
.fx .chip::before { animation: blink 2.4s ease-in-out infinite; }
@keyframes blink { 50% { transform: scale(1.7); opacity: 0.45; } }

/* Arrows nudge on the main buttons */
.fx .hero .btn-gold .arrow { animation: nudge 1.8s ease-in-out infinite; }
@keyframes nudge { 50% { transform: translateX(5px); } }

@media (prefers-reduced-motion: reduce) {
  .ticker { display: none; }
}
