/* === Sky Suites — Premium Animations & Micro-Interactions === */
/* World-class luxury hospitality design system enhancement */

/* ===========================
   SCROLL-TRIGGERED REVEALS
   =========================== */

/* Base states — hidden before animation */
[data-animate] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

[data-animate="fade"] {
  transform: none;
}

[data-animate="slide-left"] {
  transform: translateX(-40px);
}

[data-animate="slide-right"] {
  transform: translateX(40px);
}

[data-animate="scale"] {
  transform: scale(0.95);
}

[data-animate="blur"] {
  filter: blur(8px);
  transform: translateY(16px);
  transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* Visible state */
[data-animate].is-visible {
  opacity: 1;
  transform: none;
  filter: none;
}

/* Stagger children — add data-stagger to parent */
[data-stagger] > [data-animate]:nth-child(1) { transition-delay: 0ms; }
[data-stagger] > [data-animate]:nth-child(2) { transition-delay: 80ms; }
[data-stagger] > [data-animate]:nth-child(3) { transition-delay: 160ms; }
[data-stagger] > [data-animate]:nth-child(4) { transition-delay: 240ms; }
[data-stagger] > [data-animate]:nth-child(5) { transition-delay: 320ms; }
[data-stagger] > [data-animate]:nth-child(6) { transition-delay: 400ms; }
[data-stagger] > [data-animate]:nth-child(7) { transition-delay: 480ms; }
[data-stagger] > [data-animate]:nth-child(8) { transition-delay: 560ms; }

/* ===========================
   HERO ANIMATIONS
   =========================== */
@keyframes hero-title-reveal {
  from {
    opacity: 0;
    transform: translateY(40px);
    filter: blur(4px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
    filter: blur(0);
  }
}

@keyframes hero-subtitle-reveal {
  from { opacity: 0; transform: translateY(24px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-kpi-reveal {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}

@keyframes hero-cta-reveal {
  from { opacity: 0; transform: translateY(16px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes hero-badge-reveal {
  from { opacity: 0; transform: translateY(-10px) scale(0.9); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

.hero-animate .hero-badge {
  animation: hero-badge-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.2s both;
}

.hero-animate .hero h1,
.hero-animate .hero-title {
  animation: hero-title-reveal 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.35s both;
}

.hero-animate .hero-subtitle {
  animation: hero-subtitle-reveal 0.8s cubic-bezier(0.16, 1, 0.3, 1) 0.55s both;
}

.hero-animate .hero-kpis {
  animation: hero-kpi-reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) 0.7s both;
}

.hero-animate .hero-ctas {
  animation: hero-cta-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 0.85s both;
}

.hero-animate .hero-note,
.hero-animate .hero-market-copy {
  animation: hero-subtitle-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) 1.0s both;
}

/* Subtle parallax on hero background */
.hero-bg {
  will-change: transform;
  transition: transform 0.1s linear;
}

/* Scroll indicator */
@keyframes scroll-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.6; }
  50% { transform: translateY(8px); opacity: 1; }
}

.scroll-indicator {
  position: absolute;
  bottom: 32px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 3;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: rgba(255,255,255,0.6);
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  animation: scroll-bounce 2s ease-in-out infinite;
}

.scroll-indicator svg {
  width: 20px;
  height: 20px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

/* ===========================
   BUTTON MICRO-INTERACTIONS
   =========================== */

/* Gold shimmer on primary buttons */
.btn-primary,
.btn-gold {
  position: relative;
  overflow: hidden;
}

.btn-primary::before,
.btn-gold::before {
  content: '';
  position: absolute;
  top: 0;
  left: -100%;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255,255,255,0.08) 50%,
    transparent 100%
  );
  transition: left 0.5s ease;
}

.btn-primary:hover::before,
.btn-gold:hover::before {
  left: 100%;
}

/* Magnetic button effect via JS — CSS part */
.btn-magnetic {
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.3s cubic-bezier(0.16, 1, 0.3, 1),
              background 0.2s ease;
}

/* ===========================
   CARD INTERACTIONS
   =========================== */

/* Lift card on hover */
.card-lift {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              border-color 0.3s ease;
}

.card-lift:hover {
  transform: translateY(-4px);
  box-shadow: 0 12px 40px rgba(26,26,46,0.10), 0 2px 8px rgba(26,26,46,0.04);
  border-color: rgba(201,169,110,0.2);
}

/* Gold accent line on card hover */
.card-gold-accent {
  position: relative;
  overflow: hidden;
}

.card-gold-accent::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background: linear-gradient(90deg, var(--champagne) 0%, var(--champagne-light) 100%);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.card-gold-accent:hover::after {
  transform: scaleX(1);
}

/* ===========================
   LINK INTERACTIONS
   =========================== */

/* Gold underline slide from left */
.link-gold {
  position: relative;
  display: inline;
}

.link-gold::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  width: 100%;
  height: 1.5px;
  background: var(--champagne);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.link-gold:hover::after {
  transform: scaleX(1);
}

/* ===========================
   DECORATIVE ELEMENTS
   =========================== */

/* Gold gradient divider line */
.gold-divider {
  width: 60px;
  height: 2px;
  background: linear-gradient(90deg, var(--champagne), var(--champagne-light));
  border: none;
  margin: var(--space-6) 0;
  border-radius: 1px;
}

.gold-divider-center {
  margin-left: auto;
  margin-right: auto;
}

/* Animated gold line that grows on scroll */
.gold-line-grow {
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--champagne), var(--champagne-light), var(--champagne));
  transition: width 1.2s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 1px;
}

.gold-line-grow.is-visible {
  width: 80px;
}

/* Subtle dot pattern decorations */
.dots-pattern {
  position: absolute;
  width: 120px;
  height: 120px;
  background-image: radial-gradient(circle, rgba(201,169,110,0.15) 1px, transparent 1px);
  background-size: 16px 16px;
  z-index: 0;
  pointer-events: none;
}

/* Section background variations */
.section-cream {
  background: var(--ivory-warm);
}

.section-gradient {
  background: linear-gradient(180deg, var(--ivory) 0%, var(--ivory-warm) 50%, var(--ivory) 100%);
}

.section-warm {
  background: linear-gradient(135deg, #FAF6ED 0%, #FDF9F0 50%, #F8F3E8 100%);
}

/* ===========================
   TRUST BAR ENHANCEMENT
   =========================== */
.trust-bar {
  background: var(--charcoal);
  color: rgba(255,255,255,0.75);
  padding: 10px 0;
  font-size: var(--text-xs);
  letter-spacing: 0.06em;
  overflow: hidden;
  position: relative;
}

.trust-bar-inner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-8);
  white-space: nowrap;
}

.trust-bar-item {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}

.trust-bar-item::before {
  content: '';
  width: 5px;
  height: 5px;
  background: var(--champagne);
  border-radius: 50%;
  flex-shrink: 0;
}

/* Marquee animation for trust bar */
@keyframes marquee {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.trust-bar-marquee {
  display: flex;
  gap: var(--space-8);
  animation: marquee 30s linear infinite;
}

.trust-bar-marquee:hover {
  animation-play-state: paused;
}

/* ===========================
   ENHANCED FOOTER
   =========================== */
.site-footer {
  position: relative;
  overflow: hidden;
}

.site-footer::before {
  content: '';
  position: absolute;
  top: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--champagne), transparent);
}

/* ===========================
   IMAGE TREATMENTS
   =========================== */

/* Subtle reveal for images */
.img-reveal {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.img-reveal img {
  transition: transform 0.8s cubic-bezier(0.16, 1, 0.3, 1),
              filter 0.6s ease;
}

.img-reveal:hover img {
  transform: scale(1.03);
}

/* Image with gold border accent */
.img-gold-frame {
  position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
}

.img-gold-frame::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(201,169,110,0.2);
  pointer-events: none;
}

/* ===========================
   PULL QUOTE
   =========================== */
.pull-quote {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: var(--text-2xl);
  font-style: italic;
  color: var(--charcoal);
  line-height: 1.4;
  position: relative;
  padding-left: var(--space-8);
  border-left: 3px solid var(--champagne);
  margin: var(--space-10) 0;
  max-width: 56ch;
}

/* ===========================
   NUMBER COUNTER ANIMATION
   =========================== */
@keyframes count-glow {
  0%, 100% { text-shadow: none; }
  50% { text-shadow: 0 0 20px rgba(201,169,110,0.3); }
}

.counter-animate {
  font-variant-numeric: tabular-nums;
}

.counter-animate.counting {
  animation: count-glow 0.8s ease;
}

/* ===========================
   NAVIGATION ENHANCEMENTS
   =========================== */

/* Active nav indicator dot */
.nav-desktop a.active {
  position: relative;
}

.nav-desktop a.active::after {
  content: '';
  position: absolute;
  bottom: 2px;
  left: 50%;
  transform: translateX(-50%);
  width: 4px;
  height: 4px;
  background: var(--champagne);
  border-radius: 50%;
}

/* ===========================
   SECTION NUMBER LABELS
   =========================== */
.section-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 72px;
  font-weight: 700;
  color: rgba(201,169,110,0.08);
  line-height: 1;
  position: absolute;
  top: -10px;
  left: -10px;
  pointer-events: none;
  user-select: none;
}

/* ===========================
   BLOG CARD ENHANCEMENTS
   =========================== */
.blog-card {
  transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1),
              box-shadow 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.blog-card:hover {
  transform: translateY(-6px);
  box-shadow: 0 16px 48px rgba(26,26,46,0.10);
}

.blog-card .read-link {
  transition: gap 0.3s ease, color 0.2s ease;
}

.blog-card:hover .read-link {
  gap: var(--space-3);
  color: var(--champagne-dark);
}

/* ===========================
   LOADING SHIMMER
   =========================== */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.shimmer {
  background: linear-gradient(
    90deg,
    var(--cream) 0%,
    var(--ivory) 40%,
    var(--cream) 60%,
    var(--ivory) 100%
  );
  background-size: 200% 100%;
  animation: shimmer 2s ease infinite;
}

/* ===========================
   SMOOTH PAGE TRANSITIONS
   =========================== */
@keyframes page-enter {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

main {
  animation: page-enter 0.4s cubic-bezier(0.16, 1, 0.3, 1) both;
}

/* ===========================
   REDUCED MOTION
   =========================== */
@media (prefers-reduced-motion: reduce) {
  [data-animate] {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    transition: none !important;
  }

  .hero-animate .hero-badge,
  .hero-animate .hero h1,
  .hero-animate .hero-title,
  .hero-animate .hero-subtitle,
  .hero-animate .hero-kpis,
  .hero-animate .hero-ctas,
  .hero-animate .hero-note,
  .hero-animate .hero-market-copy {
    animation: none !important;
    opacity: 1 !important;
  }

  .trust-bar-marquee {
    animation: none !important;
  }

  .scroll-indicator {
    animation: none !important;
  }

  main {
    animation: none !important;
  }

  .gold-line-grow {
    width: 80px !important;
    transition: none !important;
  }
}

/* ===========================
   MOBILE ADAPTATIONS
   =========================== */
@media (max-width: 768px) {
  .scroll-indicator {
    display: none;
  }

  .dots-pattern {
    display: none;
  }

  .section-number {
    font-size: 48px;
  }

  .pull-quote {
    font-size: var(--text-xl);
    padding-left: var(--space-5);
  }

  [data-animate] {
    transform: translateY(20px);
  }

  [data-animate="slide-left"],
  [data-animate="slide-right"] {
    transform: translateY(20px);
  }
}
