/* Homepage motion - PREVIZUALIZARE (25 sep 2026). Activ doar cu clasa .vmh pe <html>
   (?motion=1 pune cookie-ul vp_motion 30 de zile, ?motion=0 il sterge). Doar CSS + transform/opacity/clip-path,
   fara GSAP/Lenis. H1-ul (elementul LCP pe mobil) NU se ascunde si nu se misca; se anima doar culoarea cuvantului accentuat. */

/* 1. Linie de brand care se umple sus, la deschiderea paginii, apoi dispare */
html.vmh body::after {
  content: ""; position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 10000; pointer-events: none;
  background: linear-gradient(90deg, #C8179A 0%, #7C3AED 55%, #2563EB 100%);
  transform-origin: 0 50%; transform: scaleX(0);
  animation: vmhBar 1.15s cubic-bezier(.22,1,.36,1) .05s forwards, vmhOut .5s ease 1.35s forwards;
}
@keyframes vmhBar { to { transform: scaleX(1); } }
@keyframes vmhOut { to { opacity: 0; } }

/* 2. Cuvantul accentuat din titlu: o trecere de gradient magenta -> violet -> albastru, o singura data, apoi ramane magenta */
html.vmh .hero-h1 em {
  background: linear-gradient(100deg, #C8179A 0%, #C8179A 38%, #7C3AED 50%, #2563EB 58%, #C8179A 72%, #C8179A 100%);
  background-size: 260% 100%; background-position: 100% 0;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: vmhSweep 2.2s cubic-bezier(.4,0,.2,1) 1s both;
}
@keyframes vmhSweep { from { background-position: 100% 0; } to { background-position: 0 0; } }

/* 3. Cardurile din dreapta (desktop): intra pe rand, din adancime; inclinare fina dupa mouse (home-motion.js) */
html.vmh .hero-showcase { animation: none; transition: transform .6s cubic-bezier(.22,1,.36,1); }
html.vmh .hero-card { animation: vmhCard1 1s cubic-bezier(.22,1,.36,1) .45s backwards; }
html.vmh .hero-card:nth-child(2) { animation: vmhCard2 1s cubic-bezier(.22,1,.36,1) .62s backwards; }
html.vmh .hero-card:nth-child(3) { animation-delay: .79s; }
@keyframes vmhCard1 { from { opacity: 0; transform: translateY(46px) scale(.94) rotateX(8deg); } to { opacity: 1; transform: none; } }
@keyframes vmhCard2 { from { opacity: 0; transform: translate(36px, 46px) scale(.94) rotateX(8deg); } to { opacity: 1; transform: translateX(36px); } }

/* 4. Titlurile de sectiune se dezvaluie de jos in sus, ca de sub o masca */
html.vmh .sec-head.reveal h2, html.vmh main section h2.reveal {
  clip-path: inset(0 0 100% 0); transform: translateY(14px);
  transition: clip-path 1s cubic-bezier(.22,1,.36,1) .1s, transform 1s cubic-bezier(.22,1,.36,1) .1s;
}
html.vmh .sec-head.reveal.in h2, html.vmh main section h2.reveal.in { clip-path: inset(0 0 -10% 0); transform: none; }

/* 5. Cardurile (proprietati, servicii, echipa, blog) intra esalonat, cu o usoara crestere */
html.vmh .prop-card.reveal, html.vmh .svc-card.reveal, html.vmh .team-card.reveal, html.vmh .blog-card.reveal {
  transform: translateY(28px) scale(.975);
  transition: opacity .8s cubic-bezier(.22,1,.36,1), transform .8s cubic-bezier(.22,1,.36,1);
}
html.vmh .prop-card.reveal.in, html.vmh .svc-card.reveal.in, html.vmh .team-card.reveal.in, html.vmh .blog-card.reveal.in { transform: none; }
html.vmh .prop-card.reveal:nth-child(3n+2), html.vmh .svc-card.reveal:nth-child(3n+2), html.vmh .team-card.reveal:nth-child(3n+2), html.vmh .blog-card.reveal:nth-child(3n+2) { transition-delay: .09s; }
html.vmh .prop-card.reveal:nth-child(3n+3), html.vmh .svc-card.reveal:nth-child(3n+3), html.vmh .team-card.reveal:nth-child(3n+3), html.vmh .blog-card.reveal:nth-child(3n+3) { transition-delay: .18s; }

@media (prefers-reduced-motion: reduce) {
  html.vmh body::after { display: none; }
  html.vmh .hero-h1 em { animation: none; background: none; color: var(--mag, #C8179A); -webkit-text-fill-color: currentColor; }
  html.vmh .hero-card, html.vmh .hero-card:nth-child(2) { animation: none; }
  html.vmh .sec-head.reveal h2, html.vmh main section h2.reveal { clip-path: none; transform: none; transition: none; }
  html.vmh .prop-card.reveal, html.vmh .svc-card.reveal, html.vmh .team-card.reveal, html.vmh .blog-card.reveal { transform: none; transition: opacity .2s ease; }
}
