/* Home page — real estate themed animations */

@media (prefers-reduced-motion: reduce) {
  .page-home *,
  .page-home *::before,
  .page-home *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .property-ticker .property-ticker-track { animation: none !important; }
  .hero-video-bg { display: none !important; }
  .hero-poster-fallback { display: block !important; }
}

/* ── Hero floating property icons ── */
.hero-re-icons {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  overflow: hidden;
}
.hero-re-icon {
  position: absolute;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  color: rgba(255, 255, 255, 0.22);
  font-size: 28px;
  animation: re-float 5s ease-in-out infinite;
  animation-delay: calc(var(--d, 0) * 0.7s);
}
.hero-re-icon small {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  color: rgba(232, 184, 75, 0.45);
}
.hero-re-icon:nth-child(1) { top: 18%; right: 8%; }
.hero-re-icon:nth-child(2) { top: 42%; right: 14%; font-size: 24px; }
.hero-re-icon:nth-child(3) { bottom: 28%; right: 6%; font-size: 32px; }
.hero-re-icon:nth-child(4) { top: 25%; left: 6%; font-size: 26px; }
.hero-re-icon:nth-child(5) { bottom: 35%; left: 10%; font-size: 22px; }
.hero-re-icon:nth-child(6) { top: 55%; left: 4%; font-size: 30px; }

@keyframes re-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-14px) rotate(3deg); }
}

/* Hero entrance */
.hero.is-loaded .anim-hero-item {
  opacity: 1;
  transform: translateY(0);
}
.anim-hero-item {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.hero.is-loaded .anim-hero-item:nth-child(1) { transition-delay: 0.1s; }
.hero.is-loaded .anim-hero-item:nth-child(2) { transition-delay: 0.25s; }
.hero.is-loaded .anim-hero-item:nth-child(3) { transition-delay: 0.4s; }
.hero.is-loaded .anim-hero-item:nth-child(4) { transition-delay: 0.55s; }
.hero.is-loaded .hero-stats {
  opacity: 1;
  transform: translateY(0);
}
.hero .hero-stats {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s ease 0.65s, transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.65s;
}

/* Property type ticker */
.property-ticker {
  background: var(--navy);
  border-bottom: 2px solid var(--gold);
  overflow: hidden;
  max-width: 100%;
  contain: content;
  padding: 14px 0;
}
.property-ticker-track {
  display: flex;
  width: max-content;
  max-width: none;
  animation: ticker-scroll 32s linear infinite;
  will-change: transform;
}
.property-ticker:hover .property-ticker-track { animation-play-state: paused; }
.property-ticker-group {
  display: flex;
  align-items: center;
  flex-shrink: 0;
}
.property-ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 0 28px;
  color: rgba(255, 255, 255, 0.88);
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  letter-spacing: 0.3px;
}
.property-ticker-item i {
  color: var(--gold-light);
  font-size: 15px;
}
.property-ticker-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--gold);
  opacity: 0.6;
  flex-shrink: 0;
}

@keyframes ticker-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Scroll reveal */
.anim-reveal,
.anim-reveal-left,
.anim-reveal-right,
.anim-scale,
.anim-flip-up {
  opacity: 0;
  transition:
    opacity 0.65s ease,
    transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
}
.anim-reveal { transform: translateY(36px); }
.anim-reveal-left { transform: translateX(-40px); }
.anim-reveal-right { transform: translateX(40px); }
.anim-scale { transform: scale(0.88); }
.anim-flip-up { transform: translateY(24px) rotateX(12deg); transform-origin: bottom center; }

.anim-visible {
  opacity: 1 !important;
  transform: none !important;
}

/* Stagger delay via JS --stagger */
.anim-stagger { transition-delay: calc(var(--stagger, 0) * 0.08s); }

/* Why stats — property icons */
.why-item {
  position: relative;
}
.why-item .why-icon {
  display: block;
  font-size: 22px;
  color: var(--gold);
  margin-bottom: 8px;
  opacity: 0;
  transform: translateY(12px) scale(0.5);
  transition: opacity 0.5s ease, transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}
.why-item.anim-visible .why-icon {
  opacity: 1;
  transform: translateY(0) scale(1);
}
.why-item.anim-visible .why-num {
  animation: num-pop 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 0.15s both;
}

@keyframes num-pop {
  0% { transform: scale(0.6); opacity: 0.5; }
  100% { transform: scale(1); opacity: 1; }
}

/* Project card — sold tag pulse + image zoom */
.page-home .project-card.anim-visible .card-img img {
  animation: plot-zoom 8s ease-in-out infinite alternate;
}
@keyframes plot-zoom {
  0% { transform: scale(1); }
  100% { transform: scale(1.06); }
}
.page-home .project-card .card-tag {
  animation: tag-glow 2.5s ease-in-out infinite;
}
@keyframes tag-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201, 149, 42, 0.4); }
  50% { box-shadow: 0 0 0 6px rgba(201, 149, 42, 0); }
}

/* Feature rows — key handover slide */
.page-home .feature-row.anim-visible .feature-icon {
  animation: icon-bounce 0.7s cubic-bezier(0.34, 1.56, 0.64, 1);
}
@keyframes icon-bounce {
  0% { transform: scale(0) rotate(-20deg); }
  100% { transform: scale(1) rotate(0); }
}

/* About badge — years pulse */
.about-badge.anim-pulse {
  animation: badge-pulse 2.5s ease-in-out infinite;
}
@keyframes badge-pulse {
  0%, 100% { transform: scale(1); box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2); }
  50% { transform: scale(1.04); box-shadow: 0 14px 40px rgba(201, 149, 42, 0.25); }
}

/* Video section — frame lift */
.page-home .video-frame.anim-visible {
  animation: frame-lift 0.8s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes frame-lift {
  from { transform: translateY(40px) scale(0.95); opacity: 0; }
  to { transform: translateY(0) scale(1); opacity: 1; }
}

/* Bank logos marquee feel */
.page-home .bank-logo.anim-visible {
  animation: bank-in 0.5s ease both;
}
.page-home .bank-logo.anim-visible:nth-child(1) { animation-delay: 0.05s; }
.page-home .bank-logo.anim-visible:nth-child(2) { animation-delay: 0.1s; }
.page-home .bank-logo.anim-visible:nth-child(3) { animation-delay: 0.15s; }
.page-home .bank-logo.anim-visible:nth-child(4) { animation-delay: 0.2s; }
.page-home .bank-logo.anim-visible:nth-child(5) { animation-delay: 0.25s; }
@keyframes bank-in {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* CTA — plot grid background */
#cta {
  position: relative;
  overflow: hidden;
}
#cta::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  animation: plot-grid-move 20s linear infinite;
  pointer-events: none;
}
@keyframes plot-grid-move {
  0% { background-position: 0 0; }
  100% { background-position: 48px 48px; }
}
#cta .container { position: relative; z-index: 1; }
#cta.anim-visible h2 {
  animation: cta-title 0.7s ease both;
}
@keyframes cta-title {
  from { opacity: 0; letter-spacing: 0.2em; }
  to { opacity: 1; letter-spacing: normal; }
}

/* Contact — map pin drop */
.contact-map-wrap.anim-visible::after {
  content: '\f3c5';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 42%;
  left: 50%;
  font-size: 36px;
  color: var(--dark-green);
  transform: translate(-50%, -120%);
  animation: pin-drop 0.8s cubic-bezier(0.34, 1.56, 0.64, 1) 0.3s both;
  pointer-events: none;
  text-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  z-index: 2;
}
.contact-map-wrap {
  position: relative;
}
@keyframes pin-drop {
  0% { transform: translate(-50%, -200%); opacity: 0; }
  70% { transform: translate(-50%, -110%); }
  100% { transform: translate(-50%, -120%); opacity: 1; }
}

/* Contact form fields stagger */
.page-home .contact-form .form-field {
  opacity: 0;
  transform: translateX(20px);
  transition: opacity 0.45s ease, transform 0.45s ease;
}
.page-home .contact-form.anim-visible .form-field {
  opacity: 1;
  transform: translateX(0);
}
.page-home .contact-form .form-field {
  width: 100%;
}
.page-home .contact-form .form-field input,
.page-home .contact-form .form-field select,
.page-home .contact-form .form-field textarea,
.page-home .contact-form .form-field button {
  width: 100%;
}

/* Testimonial cards — home key icon */
.page-home .testi-card.anim-visible::before {
  content: '\f084';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  top: 16px;
  right: 18px;
  font-size: 14px;
  color: var(--gold);
  opacity: 0.35;
  animation: key-twinkle 2s ease-in-out infinite;
}
.page-home .testi-card { position: relative; }
@keyframes key-twinkle {
  0%, 100% { opacity: 0.2; transform: rotate(-8deg); }
  50% { opacity: 0.5; transform: rotate(8deg); }
}

/* Blog card — rising building */
.page-home .blog-card.anim-visible .blog-img img {
  animation: blog-rise 0.9s cubic-bezier(0.22, 1, 0.36, 1) both;
}
@keyframes blog-rise {
  from { transform: translateY(20px) scale(1.05); }
  to { transform: translateY(0) scale(1); }
}

/* Section label draw line */
.page-home .section-label.anim-visible::before {
  animation: line-grow 0.6s ease both;
}
@keyframes line-grow {
  from { width: 0; }
  to { width: 30px; }
}

@media (max-width: 900px) {
  .hero-re-icons { display: none; }
}

@media (max-width: 768px) {
  .hero-video-bg { display: none; }
  .hero-poster-fallback { display: block; }
}
