/* ============================================
   HEYDAY Senior Living — Animations
   ============================================ */

/* --- Keyframes --- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.7; transform: scale(0.95); }
}

@keyframes loadingBar {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(350%); }
}

@keyframes scrollLine {
  0% { transform: scaleY(0); transform-origin: top; opacity: 1; }
  50% { transform: scaleY(1); transform-origin: top; opacity: 1; }
  51% { transform-origin: bottom; }
  100% { transform: scaleY(0); transform-origin: bottom; opacity: 0; }
}

@keyframes heroBgZoom {
  from { transform: scale(1); }
  to { transform: scale(1.15); }
}

@keyframes scrollWheel {
  0% { opacity: 1; transform: translateY(0); }
  70% { opacity: 0.2; transform: translateY(10px); }
  100% { opacity: 0; transform: translateY(10px); }
}

@keyframes floatCard1 {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-20px) rotate(1deg); }
}

@keyframes floatCard2 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-16px) rotate(-1deg); }
}

@keyframes floatCard3 {
  0%, 100% { transform: translateY(0) rotate(1deg); }
  50% { transform: translateY(-22px) rotate(-2deg); }
}

@keyframes floatCard4 {
  0%, 100% { transform: translateY(0) rotate(-1deg); }
  50% { transform: translateY(-14px) rotate(2deg); }
}

@keyframes floatCard5 {
  0%, 100% { transform: translateY(0) rotate(2deg); }
  50% { transform: translateY(-18px) rotate(-1deg); }
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(40px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeInDown {
  from {
    opacity: 0;
    transform: translateY(-30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

@keyframes shimmer {
  0% { background-position: -200% center; }
  100% { background-position: 200% center; }
}

@keyframes float {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes countPop {
  0% { transform: scale(0.5); opacity: 0; }
  60% { transform: scale(1.1); }
  100% { transform: scale(1); opacity: 1; }
}

/* --- Scroll Reveal --- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1)),
              transform 0.8s var(--ease-out, cubic-bezier(0.22, 1, 0.36, 1));
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-left.revealed {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-right.revealed {
  opacity: 1;
  transform: translateX(0);
}

/* --- Image Reveal --- */
.image-reveal {
  clip-path: inset(0 100% 0 0);
  transition: clip-path 1.1s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-reveal--right {
  clip-path: inset(0 0 0 100%);
}

.image-reveal.revealed {
  clip-path: inset(0 0 0 0);
}

.image-reveal img {
  transform: scale(1.12);
  transition: transform 1.4s cubic-bezier(0.22, 1, 0.36, 1);
}

.image-reveal.revealed img {
  transform: scale(1);
}

/* Parent revealed — show nested lifestyle / healthcare images */
.lifestyle-row.revealed .image-reveal,
.lifestyle-row.revealed .image-reveal--right,
.reveal-left.revealed .image-reveal,
.reveal-right.revealed .image-reveal {
  clip-path: inset(0 0 0 0);
}

.lifestyle-row.revealed .image-reveal img,
.reveal-left.revealed .image-reveal img,
.reveal-right.revealed .image-reveal img {
  transform: scale(1);
}

.lifestyle-row:nth-child(1) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(1) .reveal-right { transition-delay: 0.15s; }
.lifestyle-row:nth-child(2) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(2) .reveal-left { transition-delay: 0.15s; }
.lifestyle-row:nth-child(3) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(3) .reveal-right { transition-delay: 0.15s; }
.lifestyle-row:nth-child(4) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(4) .reveal-left { transition-delay: 0.15s; }
.lifestyle-row:nth-child(5) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(5) .reveal-right { transition-delay: 0.15s; }
.lifestyle-row:nth-child(6) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(6) .reveal-left { transition-delay: 0.15s; }
.lifestyle-row:nth-child(7) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(7) .reveal-right { transition-delay: 0.15s; }
.lifestyle-row:nth-child(8) .image-reveal { transition-delay: 0s; }
.lifestyle-row:nth-child(8) .reveal-left { transition-delay: 0.15s; }

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

.reveal-scale.revealed {
  opacity: 1;
  transform: scale(1);
}

/* Stagger delays for grid children */
.amenity-grid .reveal-scale:nth-child(1) { transition-delay: 0s; }
.amenity-grid .reveal-scale:nth-child(2) { transition-delay: 0.05s; }
.amenity-grid .reveal-scale:nth-child(3) { transition-delay: 0.1s; }
.amenity-grid .reveal-scale:nth-child(4) { transition-delay: 0.15s; }
.amenity-grid .reveal-scale:nth-child(5) { transition-delay: 0.08s; }
.amenity-grid .reveal-scale:nth-child(6) { transition-delay: 0.13s; }
.amenity-grid .reveal-scale:nth-child(7) { transition-delay: 0.18s; }
.amenity-grid .reveal-scale:nth-child(8) { transition-delay: 0.23s; }
.amenity-grid .reveal-scale:nth-child(9) { transition-delay: 0.1s; }
.amenity-grid .reveal-scale:nth-child(10) { transition-delay: 0.15s; }
.amenity-grid .reveal-scale:nth-child(11) { transition-delay: 0.2s; }
.amenity-grid .reveal-scale:nth-child(12) { transition-delay: 0.25s; }

@keyframes amenityPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(255, 255, 255, 0); }
  50% { box-shadow: 0 0 0 6px rgba(255, 255, 255, 0.06); }
}

.amenity-item.revealed .amenity-item__icon {
  animation: amenityPulse 3s ease-in-out infinite;
}

.amenity-item:nth-child(2) .amenity-item__icon { animation-delay: 0.4s; }
.amenity-item:nth-child(3) .amenity-item__icon { animation-delay: 0.8s; }
.amenity-item:nth-child(4) .amenity-item__icon { animation-delay: 1.2s; }
.amenity-item:nth-child(5) .amenity-item__icon { animation-delay: 0.2s; }
.amenity-item:nth-child(6) .amenity-item__icon { animation-delay: 0.6s; }
.amenity-item:nth-child(7) .amenity-item__icon { animation-delay: 1s; }
.amenity-item:nth-child(8) .amenity-item__icon { animation-delay: 1.4s; }
.amenity-item:nth-child(9) .amenity-item__icon { animation-delay: 0.3s; }
.amenity-item:nth-child(10) .amenity-item__icon { animation-delay: 0.7s; }
.amenity-item:nth-child(11) .amenity-item__icon { animation-delay: 1.1s; }
.amenity-item:nth-child(12) .amenity-item__icon { animation-delay: 1.5s; }

.amenity-item:hover .amenity-item__icon {
  animation: none;
}

.stats__grid .reveal:nth-child(1) { transition-delay: 0s; }
.stats__grid .reveal:nth-child(2) { transition-delay: 0.1s; }
.stats__grid .reveal:nth-child(3) { transition-delay: 0.2s; }
.stats__grid .reveal:nth-child(4) { transition-delay: 0.3s; }
.stats__grid .reveal:nth-child(5) { transition-delay: 0.4s; }

.stats__header.reveal { transition-delay: 0s; }

.stats__item.revealed .stats__icon {
  animation: statsIconPulse 2s ease-in-out infinite;
}

.stats__item:nth-child(2).revealed .stats__icon { animation-delay: 0.2s; }
.stats__item:nth-child(3).revealed .stats__icon { animation-delay: 0.4s; }
.stats__item:nth-child(4).revealed .stats__icon { animation-delay: 0.6s; }
.stats__item:nth-child(5).revealed .stats__icon { animation-delay: 0.8s; }

@keyframes statsIconPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(var(--rgb-brand-red), 0.2); }
  50% { box-shadow: 0 0 0 8px rgba(var(--rgb-brand-red), 0); }
}

@keyframes lightboxFadeIn {
  from { opacity: 0; transform: scale(0.95); }
  to { opacity: 1; transform: scale(1); }
}

.lightbox:not([hidden]) .lightbox__backdrop {
  animation: fadeIn 0.35s ease forwards;
}

/* --- About stagger --- */
.about__content .reveal:nth-child(1) { transition-delay: 0.05s; }
.about__content .reveal:nth-child(2) { transition-delay: 0.15s; }
.about__content .reveal:nth-child(3) { transition-delay: 0.25s; }

.about__highlights .about__highlight.reveal:nth-child(1) { transition-delay: 0.1s; }
.about__highlights .about__highlight.reveal:nth-child(2) { transition-delay: 0.18s; }
.about__highlights .about__highlight.reveal:nth-child(3) { transition-delay: 0.26s; }
.about__highlights .about__highlight.reveal:nth-child(4) { transition-delay: 0.34s; }
.about__highlights .about__highlight.reveal:nth-child(5) { transition-delay: 0.42s; }
.about__highlights .about__highlight.reveal:nth-child(6) { transition-delay: 0.5s; }
.about__highlights .about__highlight.reveal:nth-child(7) { transition-delay: 0.58s; }

.about__actions.reveal { transition-delay: 0.65s; }

.about__visual.reveal-left { transition-delay: 0s; }
.about__visual .reveal-scale { transition-delay: 0.4s; }

@keyframes timelineDotPop {
  0% { transform: scale(0.6); opacity: 0.5; }
  60% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}

.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(1) { transition-delay: 0.1s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(2) { transition-delay: 0.2s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(3) { transition-delay: 0.3s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(4) { transition-delay: 0.4s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(5) { transition-delay: 0.5s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(6) { transition-delay: 0.6s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(7) { transition-delay: 0.7s; }
.healthcare__timeline-list .healthcare__timeline-item.reveal:nth-child(8) { transition-delay: 0.8s; }

.healthcare__content > .reveal:nth-child(1) { transition-delay: 0s; }
.healthcare__content > .reveal:nth-child(2) { transition-delay: 0.1s; }
.healthcare__content > .reveal:nth-child(3) { transition-delay: 0.2s; }
.living-cards .reveal:nth-child(1) { transition-delay: 0s; }
.living-cards .reveal:nth-child(2) { transition-delay: 0.12s; }
.living-cards .reveal:nth-child(3) { transition-delay: 0.24s; }

.floor-plans__grid .reveal:nth-child(1) { transition-delay: 0s; }
.floor-plans__grid .reveal:nth-child(2) { transition-delay: 0.12s; }
.floor-plans__grid .reveal:nth-child(3) { transition-delay: 0.24s; }
.floor-plans__grid .reveal:nth-child(4) { transition-delay: 0.36s; }

.location-advantages__cards .reveal-scale:nth-child(1) { transition-delay: 0s; }
.location-advantages__cards .reveal-scale:nth-child(2) { transition-delay: 0.08s; }
.location-advantages__cards .reveal-scale:nth-child(3) { transition-delay: 0.16s; }
.location-advantages__cards .reveal-scale:nth-child(4) { transition-delay: 0.24s; }
.location-advantages__cards .reveal-scale:nth-child(5) { transition-delay: 0.32s; }
.location-advantages__cards .reveal-scale:nth-child(6) { transition-delay: 0.4s; }

.location-advantages__attractions-grid .reveal-scale:nth-child(1) { transition-delay: 0.05s; }
.location-advantages__attractions-grid .reveal-scale:nth-child(2) { transition-delay: 0.1s; }
.location-advantages__attractions-grid .reveal-scale:nth-child(3) { transition-delay: 0.15s; }
.location-advantages__attractions-grid .reveal-scale:nth-child(4) { transition-delay: 0.2s; }
.location-advantages__attractions-grid .reveal-scale:nth-child(5) { transition-delay: 0.25s; }
.location-advantages__attractions-grid .reveal-scale:nth-child(6) { transition-delay: 0.3s; }

.location-advantages__content.reveal-right { transition-delay: 0.15s; }

.dist-card.revealed .dist-card__icon {
  animation: scaleIn 0.6s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.location-advantages__cards .dist-card:nth-child(2).revealed .dist-card__icon { animation-delay: 0.1s; }
.location-advantages__cards .dist-card:nth-child(3).revealed .dist-card__icon { animation-delay: 0.2s; }
.location-advantages__cards .dist-card:nth-child(4).revealed .dist-card__icon { animation-delay: 0.3s; }
.location-advantages__cards .dist-card:nth-child(5).revealed .dist-card__icon { animation-delay: 0.4s; }
.location-advantages__cards .dist-card:nth-child(6).revealed .dist-card__icon { animation-delay: 0.5s; }

@keyframes floorPlanModalIn {
  from { opacity: 0; transform: scale(0.94) translateY(20px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

@keyframes starPop {
  from { opacity: 0; transform: scale(0.4) rotate(-15deg); }
  to { opacity: 1; transform: scale(1) rotate(0deg); }
}

@keyframes faqContentIn {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}

.faq__accordion .reveal:nth-child(1) { transition-delay: 0s; }
.faq__accordion .reveal:nth-child(2) { transition-delay: 0.04s; }
.faq__accordion .reveal:nth-child(3) { transition-delay: 0.08s; }
.faq__accordion .reveal:nth-child(4) { transition-delay: 0.12s; }
.faq__accordion .reveal:nth-child(5) { transition-delay: 0.16s; }
.faq__accordion .reveal:nth-child(6) { transition-delay: 0.2s; }
.faq__accordion .reveal:nth-child(7) { transition-delay: 0.24s; }
.faq__accordion .reveal:nth-child(8) { transition-delay: 0.28s; }
.faq__accordion .reveal:nth-child(9) { transition-delay: 0.32s; }
.faq__accordion .reveal:nth-child(10) { transition-delay: 0.36s; }
.faq__accordion .reveal:nth-child(11) { transition-delay: 0.08s; }
.faq__accordion .reveal:nth-child(12) { transition-delay: 0.12s; }
.faq__accordion .reveal:nth-child(13) { transition-delay: 0.16s; }
.faq__accordion .reveal:nth-child(14) { transition-delay: 0.2s; }
.faq__accordion .reveal:nth-child(15) { transition-delay: 0.24s; }
.faq__accordion .reveal:nth-child(16) { transition-delay: 0.28s; }
.faq__accordion .reveal:nth-child(17) { transition-delay: 0.32s; }
.faq__accordion .reveal:nth-child(18) { transition-delay: 0.36s; }
.faq__accordion .reveal:nth-child(19) { transition-delay: 0.4s; }
.faq__accordion .reveal:nth-child(20) { transition-delay: 0.44s; }

@keyframes aboutShapeFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  50% { transform: translate(12px, -16px) scale(1.04); }
}

.about__shape--1 { animation: aboutShapeFloat 14s ease-in-out infinite; }
.about__shape--2 { animation: aboutShapeFloat 18s ease-in-out 2s infinite reverse; }
.about__shape--3 { animation: aboutShapeFloat 16s ease-in-out 1s infinite; }
.about__shape--4 { animation: aboutShapeFloat 12s ease-in-out 3s infinite reverse; }

/* --- Animated Buttons --- */
.btn--animated {
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.btn--animated::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent,
    rgba(255, 255, 255, 0.3),
    transparent
  );
  transition: left 0.5s ease;
  z-index: -1;
}

.btn--animated:hover::before {
  left: 100%;
}

.btn--animated::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: inherit;
  opacity: 0;
  transition: opacity 0.3s ease;
  box-shadow: 0 0 20px rgba(var(--rgb-brand-red), 0.5);
  z-index: -2;
}

.btn--animated:hover::after {
  opacity: 1;
}

/* Ripple effect on click */
.btn--animated .ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.4);
  transform: scale(0);
  animation: rippleEffect 0.6s ease-out;
  pointer-events: none;
}

@keyframes rippleEffect {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* --- Counter Animation --- */
.stats__number.counting {
  animation: countPop 0.5s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

/* --- Hero Background Zoom --- */
.hero__bg-zoom {
  animation: heroBgZoom 25s ease-out forwards;
}

/* --- Hero entrance --- */
.hero .reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1),
              transform 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero .hero__card.reveal {
  transform: none;
  transition: opacity 1s cubic-bezier(0.22, 1, 0.36, 1);
}

.hero__content .reveal:nth-child(1) { transition-delay: 0.15s; }
.hero__content .reveal:nth-child(2) { transition-delay: 0.35s; }
.hero__content .reveal:nth-child(3) { transition-delay: 0.55s; }
.hero__content .reveal:nth-child(4) { transition-delay: 0.75s; }

.hero__card.reveal:nth-child(1) { transition-delay: 0.5s; }
.hero__card.reveal:nth-child(2) { transition-delay: 0.65s; }
.hero__card.reveal:nth-child(3) { transition-delay: 0.8s; }
.hero__card.reveal:nth-child(4) { transition-delay: 0.95s; }
.hero__card.reveal:nth-child(5) { transition-delay: 1.1s; }

.hero.loaded .hero__content .reveal,
.hero.loaded .hero__content .reveal.revealed {
  opacity: 1;
  transform: translateY(0);
}

.hero.loaded .hero__card.reveal,
.hero.loaded .hero__card.reveal.revealed {
  opacity: 1;
}

/* --- Floating Hero Cards --- */
.hero.loaded .hero__card--1 { animation: floatCard1 6s ease-in-out infinite; }
.hero.loaded .hero__card--2 { animation: floatCard2 5.5s ease-in-out 0.5s infinite; }
.hero.loaded .hero__card--3 { animation: floatCard3 7s ease-in-out 1s infinite; }
.hero.loaded .hero__card--4 { animation: floatCard4 5s ease-in-out 0.3s infinite; }
.hero.loaded .hero__card--5 { animation: floatCard5 6.5s ease-in-out 0.8s infinite; }

.hero__card:hover {
  animation-play-state: paused !important;
}

/* --- Hero Scroll Indicator --- */
.hero__scroll {
  opacity: 0;
  animation: heroFadeIn 1s cubic-bezier(0.22, 1, 0.36, 1) 1.4s forwards;
}

.hero__scroll-dot {
  animation: scrollWheel 1.8s ease-in-out infinite;
}

.hero__scroll-line {
  animation: scrollLine 2s ease-in-out infinite;
}

/* --- Hover Effects --- */
.nav__toggle.active .nav__toggle-bar:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}

.nav__toggle.active .nav__toggle-bar:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}

.nav__toggle.active .nav__toggle-bar:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

@keyframes navSlideIn {
  from {
    opacity: 0;
    transform: translateX(20px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* --- Modal animation --- */
.modal:not([hidden]) .modal__content {
  animation: scaleIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.modal:not([hidden]) .modal__backdrop {
  animation: fadeIn 0.3s ease forwards;
}

/* --- Premium Motion System --- */

/* Custom cursor */
.motion-cursor {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 10000;
  opacity: 0;
  transition: opacity 0.4s ease;
}

.motion-cursor.is-active {
  opacity: 1;
}

.motion-cursor__dot,
.motion-cursor__ring {
  position: fixed;
  top: 0;
  left: 0;
  border-radius: 50%;
  pointer-events: none;
  will-change: transform;
}

.motion-cursor__dot {
  width: 6px;
  height: 6px;
  background: var(--color-gold);
  box-shadow: 0 0 12px rgba(var(--rgb-brand-red), 0.6);
}

.motion-cursor__ring {
  width: 36px;
  height: 36px;
  border: 1px solid rgba(var(--rgb-brand-red), 0.45);
  transition: width 0.35s ease, height 0.35s ease, border-color 0.35s ease, background 0.35s ease;
}

.motion-cursor.is-hover .motion-cursor__ring {
  width: 52px;
  height: 52px;
  border-color: var(--color-gold);
  background: rgba(var(--rgb-brand-red), 0.08);
}

body.has-custom-cursor,
body.has-custom-cursor a,
body.has-custom-cursor button,
body.has-custom-cursor .btn,
body.has-custom-cursor input,
body.has-custom-cursor textarea {
  cursor: none;
}

/* Particles */
.particles-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  opacity: 0.55;
}

body.motion-ready .particles-canvas {
  animation: fadeIn 1.2s ease forwards;
}

/* Section transitions */
.section-motion {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.9s cubic-bezier(0.22, 1, 0.36, 1);
}

.section-motion.section-visible {
  opacity: 1;
  transform: translateY(0);
}

.lifestyle.section-motion {
  transform: none;
  opacity: 1;
}

.facilities.section-motion,
.facilities .section-motion {
  opacity: 1;
  transform: none;
}

/* Data reveal aliases */
[data-reveal="fade-up"] {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="fade-left"] {
  opacity: 0;
  transform: translateX(-50px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="fade-right"] {
  opacity: 0;
  transform: translateX(50px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal="scale"] {
  opacity: 0;
  transform: scale(0.92);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1);
}

[data-reveal].revealed {
  opacity: 1;
  transform: none;
}

/* Image hover zoom */
.img-hover-zoom {
  overflow: hidden;
}

.img-hover-zoom img {
  transition: transform 0.75s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: transform;
}

.img-hover-zoom:hover img {
  transform: scale(1.08);
}

.hero__cards {
  will-change: transform;
  transition: transform 0.12s linear;
}

.about__visual[data-tilt] {
  transition: transform 0.15s ease-out;
  transform-style: preserve-3d;
}

@keyframes preloaderExit {
  to {
    opacity: 0;
    transform: scale(0.92) translateY(-12px);
  }
}

[data-reveal="fade-right"].revealed {
  opacity: 1;
  transform: none;
}

/* Prevent horizontal scroll from slide-in animations on mobile */
@media (max-width: 768px) {
  .reveal-left,
  .reveal-right {
    transform: translateY(28px);
  }

  .reveal-left.revealed,
  .reveal-right.revealed {
    transform: translateY(0);
  }

  [data-reveal="fade-left"],
  [data-reveal="fade-right"] {
    transform: translateY(28px);
  }

  [data-reveal="fade-left"].revealed,
  [data-reveal="fade-right"].revealed {
    transform: none;
  }

  .reveal-scale {
    transform: translateY(20px) scale(0.98);
  }

  .reveal-scale.revealed {
    transform: translateY(0) scale(1);
  }
}

/* --- Reduced motion --- */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .image-reveal {
    clip-path: none;
  }

  .image-reveal img {
    transform: none;
  }

  .hero__bg-zoom {
    animation: none;
    transform: none;
  }

  .hero.loaded .hero__card {
    animation: none !important;
  }

  .hero__scroll {
    opacity: 1;
    animation: none;
  }

  .about__shape {
    animation: none !important;
  }

  .amenity-item:hover {
    transform: none;
  }

  .amenity-item.revealed .amenity-item__icon {
    animation: none;
  }

  .healthcare__timeline.is-active .healthcare__timeline-progress {
    height: 100%;
  }

  .living-card:hover {
    transform: none;
  }

  .stats__item.revealed .stats__icon {
    animation: none;
  }

  .floor-plan-card:hover {
    transform: none;
  }

  .floor-plan-card:hover .floor-plan-card__image img {
    transform: none;
  }

  .dist-card:hover,
  .attraction-card:hover {
    transform: none;
  }

  .dist-card:hover .dist-card__icon {
    transform: none;
  }

  .dist-card.revealed .dist-card__icon {
    animation: none;
  }

  .faq-item.is-open .faq-item__icon {
    transform: none;
  }

  .faq-item.is-open .faq-item__panel-inner p {
    animation: none;
  }

  .floor-plan-card__overlay {
    opacity: 1;
  }

  .floor-plan-card__preview-btn {
    transform: none;
  }

  .about__image-frame:hover .about__image,
  .about__image-frame:hover .about__image img {
    transform: none;
  }

  html {
    scroll-behavior: auto;
  }

  .motion-cursor,
  .particles-canvas {
    display: none !important;
  }

  body.has-custom-cursor,
  body.has-custom-cursor a,
  body.has-custom-cursor button {
    cursor: auto;
  }

  .section-motion {
    opacity: 1;
    transform: none;
  }

  .header.header--hidden {
    transform: none;
  }

  .img-hover-zoom:hover img {
    transform: none;
  }

  .hero__media,
  .hero__cards,
  .about__visual[data-tilt] {
    transform: none !important;
  }
}
