/* ============================================================
   R3 RETREATS — Animations
   ============================================================ */

/* ── Page Transition ── */
@keyframes pageEnter {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

body { animation: pageEnter 0.5s ease both; }

/* ── Hero Parallax ── */
@keyframes heroFloat {
  0%, 100% { transform: scale(1.05) translateY(0); }
  50%       { transform: scale(1.05) translateY(-8px); }
}

.hero-bg { animation: heroFloat 14s ease-in-out infinite; }

/* ── Marquee Strip ── */
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

.marquee-strip {
  overflow: hidden;
  background: var(--c-soil);
  padding: 14px 0;
  white-space: nowrap;
}

.marquee-track {
  display: inline-flex;
  gap: 0;
  animation: marquee 30s linear infinite;
}

.marquee-item {
  display: inline-flex;
  align-items: center;
  gap: 24px;
  padding: 0 32px;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: rgba(250,246,239,0.55);
  font-family: var(--font-body);
}

.marquee-item::after {
  content: '·';
  color: var(--c-sage);
}

/* ── Stat Counter ── */
.stat-count {
  font-family: var(--font-display);
  font-size: clamp(2.4rem, 5vw, 4rem);
  font-weight: 300;
  color: var(--c-soil);
  display: block;
  line-height: 1;
  margin-bottom: 6px;
}

/* ── Hover line ── */
.link-underline {
  position: relative;
  display: inline-block;
}

.link-underline::after {
  content: '';
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 0;
  height: 1px;
  background: currentColor;
  transition: width var(--transition);
}

.link-underline:hover::after { width: 100%; }

/* ── Loader Bar ── */
#loader {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: var(--c-sage);
  z-index: 9999;
  transform-origin: left;
  transform: scaleX(0);
  transition: transform 0.4s ease;
}

#loader.loading { transform: scaleX(0.7); }
#loader.done    { transform: scaleX(1); opacity: 0; transition: transform 0.3s ease, opacity 0.3s ease 0.3s; }

/* ── Pulse Dot ── */
@keyframes pulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50%       { transform: scale(1.5); opacity: 0.4; }
}

.pulse-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--c-sage);
  animation: pulse 2s ease-in-out infinite;
}

/* ── Image Reveal ── */
.reveal-wrap {
  overflow: hidden;
  border-radius: var(--radius-lg);
}

.reveal-wrap img {
  transform: scale(1.08);
  transition: transform 0.9s cubic-bezier(0.16,1,0.3,1);
}

.reveal-wrap.visible img {
  transform: scale(1);
}

/* ── Selector Transition ── */
.selector-panel {
  animation: panelFade 0.4s ease both;
}

@keyframes panelFade {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── Quiz Transitions ── */
.quiz-step {
  animation: quizSlide 0.35s ease both;
}

@keyframes quizSlide {
  from { opacity: 0; transform: translateX(16px); }
  to   { opacity: 1; transform: translateX(0); }
}

/* ── Testimonial ── */
.testimonial-track {
  will-change: transform;
}

/* ── Stats Bar ── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 0;
  border-top: 1px solid var(--c-sand);
  border-bottom: 1px solid var(--c-sand);
  padding: 48px 0;
  margin: 48px 0;
}

.stat-item {
  text-align: center;
  padding: 0 24px;
  border-right: 1px solid var(--c-sand);
}

.stat-item:last-child { border-right: none; }

.stat-label {
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-stone);
  margin-top: 6px;
  display: block;
  font-family: var(--font-body);
}

@media (max-width: 760px) {
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .stat-item:nth-child(2) { border-right: none; }
  .stat-item:nth-child(3) { border-right: 1px solid var(--c-sand); border-top: 1px solid var(--c-sand); }
  .stat-item:nth-child(4) { border-top: 1px solid var(--c-sand); }
}

@media (max-width: 480px) {
  .stats-bar { grid-template-columns: 1fr 1fr; }
}

/* ── Smooth entrance for cards ── */
@keyframes cardEntrance {
  from { opacity: 0; transform: translateY(24px) scale(0.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

.card-animated {
  animation: cardEntrance 0.5s ease both;
}

/* ── Active nav indicator ── */
.nav-links a.current {
  opacity: 1;
  position: relative;
}

.nav-links a.current::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--c-sage);
}

/* ── Floating label ── */
.floating-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(122,143,116,0.12);
  border: 1px solid rgba(122,143,116,0.3);
  border-radius: 40px;
  padding: 6px 16px;
  font-size: 0.78rem;
  color: var(--c-sage);
  letter-spacing: 0.06em;
  margin-bottom: 16px;
}

/* ── Wave divider ── */
.wave-divider {
  position: relative;
  height: 80px;
  overflow: hidden;
}

.wave-divider svg {
  position: absolute;
  bottom: 0;
  width: 100%;
  height: 100%;
}
