/* Alegría BeWell — movimiento editorial compartido. La página sigue legible sin JS. */
:root { --motion-ease: cubic-bezier(.22,1,.36,1); }
html { overflow-x: clip; }
body.motion-site { overflow-x: clip; }
.motion-progress { position: fixed; inset: 0 auto auto 0; width: 100%; height: 3px; z-index: 10010; pointer-events: none; background: linear-gradient(90deg,#f47e35,#eebc43,#94a849); transform: scaleX(var(--scroll-progress,0)); transform-origin: left center; }

/* Una apertura breve, sin zoom continuo de la foto de portada. */
.motion-site .motion-hero { isolation: isolate; overflow: hidden; }
.motion-site .motion-hero > .hero-bg,
.motion-site .motion-hero > .servicios-hero-bg { animation: motion-photo-open 1.25s var(--motion-ease) both; }
.motion-site .motion-hero > .hero-overlay,
.motion-site .motion-hero > .servicios-hero-overlay { animation: motion-overlay-open 1.25s ease both; }
.motion-site .motion-hero .hero-content > *,
.motion-site .motion-hero .servicios-hero-content > * { opacity: 0; animation: motion-type-open .95s var(--motion-ease) both; }
.motion-site .motion-hero .hero-content > :nth-child(1),
.motion-site .motion-hero .servicios-hero-content > :nth-child(1) { animation-delay: .24s; }
.motion-site .motion-hero .hero-content > :nth-child(2),
.motion-site .motion-hero .servicios-hero-content > :nth-child(2) { animation-delay: .42s; }
.motion-site .motion-hero .hero-content > :nth-child(3),
.motion-site .motion-hero .servicios-hero-content > :nth-child(3) { animation-delay: .58s; }
.motion-site .motion-hero .hero-content > :nth-child(4),
.motion-site .motion-hero .servicios-hero-content > :nth-child(4) { animation-delay: .72s; }
.motion-site .motion-hero .servicios-hero-content.reveal { opacity: 1; transform: none; }
.motion-site .motion-hero::after { content: ''; position: absolute; width: 1px; height: 48px; bottom: 24px; left: 50%; background: rgba(255,255,255,.9); transform-origin: top; animation: motion-scroll-mark 2.6s ease-in-out 1.4s infinite; pointer-events: none; z-index: 2; }
@keyframes motion-photo-open { from { clip-path: inset(0 0 22% 0); opacity: .72; } to { clip-path: inset(0); opacity: 1; } }
@keyframes motion-overlay-open { from { opacity: 0; } to { opacity: 1; } }
@keyframes motion-type-open { from { opacity: 0; transform: translate3d(0,32px,0); filter: blur(6px); } to { opacity: 1; transform: translate3d(0,0,0); filter: blur(0); } }
@keyframes motion-scroll-mark { 0%,100% { transform: scaleY(.4); opacity: .55; } 50% { transform: scaleY(1); opacity: 1; } }

/* Títulos y fotos cuentan capítulos al entrar en pantalla. */
.motion-site .motion-heading { transition: opacity .95s var(--motion-ease), transform .95s var(--motion-ease), filter .95s var(--motion-ease); }
.motion-site .motion-heading:not(.is-visible) { opacity: .28; transform: translate3d(0,24px,0); filter: blur(3px); }
.motion-site .motion-media { position: relative; overflow: hidden; clip-path: inset(0 0 15% 0 round 18px); opacity: .72; transition: clip-path 1.15s var(--motion-ease), opacity 1s ease; }
.motion-site .motion-media.is-visible { clip-path: inset(0 round 18px); opacity: 1; }
.motion-site .motion-media img { transform: scale(1.075) translate3d(0,var(--motion-shift,0px),0) !important; transition: transform .9s var(--motion-ease), filter .9s ease !important; will-change: transform; }
.motion-site .motion-media.is-visible img { filter: saturate(1.03); }
.motion-site .motion-media:hover img { transform: scale(1.11) translate3d(0,var(--motion-shift,0px),0) !important; }
.motion-site .motion-media::after { content: ''; position: absolute; inset: 0; z-index: 2; pointer-events: none; background: #eee8d7; transform: translateX(0); transition: transform 1.1s var(--motion-ease); }
.motion-site .motion-media.is-visible::after { transform: translateX(102%); }
.motion-site .motion-chapter { position: relative; }
.motion-site .motion-chapter::before { content: attr(data-motion-chapter); display: block; width: min(1180px,100%); margin: 0 auto clamp(1.4rem,3vw,3rem); color: #a09a81; font: 600 .72rem/1.2 var(--font-sans,Montserrat,sans-serif); letter-spacing: .22em; }
.motion-site .motion-chapter::after { content: ''; position: absolute; left: max(2rem,calc((100% - 1180px)/2)); right: max(2rem,calc((100% - 1180px)/2)); top: clamp(5.8rem,9vw,9.2rem); height: 1px; background: linear-gradient(90deg,rgba(110,81,51,.28),transparent); pointer-events: none; }
.motion-site .eventos-item.motion-chapter::after { top: clamp(5.3rem,8vw,8rem); }
.motion-site .experiencia-section.motion-chapter::before { text-align: center; margin-bottom: 1.1rem; }
.motion-site .experiencia-section.motion-chapter::after { display: none; }
.motion-site .motion-chapter .servicio-content { transition: transform .8s var(--motion-ease), opacity .8s ease; }
.motion-site .motion-chapter:not(.is-visible) .servicio-content { transform: translateY(20px); opacity: .55; }
.motion-site .motion-chapter.is-visible .servicio-content { transform: none; opacity: 1; }

/* Inicio: ritmo entre el relato, el calendario y las secciones de comunidad. */
.motion-site .about-quote { max-width: 1100px; text-wrap: balance; }
.motion-site .about-quote .quote-highlight { background-image: linear-gradient(transparent 83%,rgba(243,126,53,.38) 0); background-size: 0% 100%; background-repeat: no-repeat; transition: background-size 1.4s var(--motion-ease) .3s; }
.motion-site .about-quote.is-visible .quote-highlight { background-size: 100% 100%; }
.motion-site .community-section, .motion-site .pilares-section, .motion-site .colors-section { position: relative; }
.motion-site .community-section::before, .motion-site .pilares-section::before { content: ''; position: absolute; left: 4%; top: 0; width: 1px; height: 80px; background: linear-gradient(#f47e35,transparent); pointer-events: none; }
.motion-site .home-booking { position: relative; }
.motion-site .home-booking::before { content: ''; position: absolute; inset: 0 auto 0 0; width: 5px; background: linear-gradient(#efb644,#f47e35,#96a947); }

/* Servicios: los cuatro caminos tienen un gesto visual común. */
.motion-site .services-quicklinks a { position: relative; overflow: hidden; isolation: isolate; transition: color .35s ease, padding-left .45s var(--motion-ease), border-color .35s ease; }
.motion-site .services-quicklinks a::before { content: ''; position: absolute; inset: 0; background: rgba(150,169,71,.1); z-index: -1; transform: translateX(-102%); transition: transform .55s var(--motion-ease); }
.motion-site .services-quicklinks a:hover::before, .motion-site .services-quicklinks a:focus-visible::before { transform: translateX(0); }
.motion-site .services-quicklinks a:hover, .motion-site .services-quicklinks a:focus-visible { padding-left: 1.1rem; }
.motion-site .service-story .servicio-title, .motion-site .eventos-item .servicio-title { text-wrap: balance; }
.motion-site .service-story-link span, .motion-site .services-closing-link span { display: inline-block; transition: transform .4s var(--motion-ease); }
.motion-site .service-story-link:hover span, .motion-site .services-closing-link:hover span { transform: translate(4px,-4px); }

/* Retiros: recuerdos en una secuencia que también funciona con toque y teclado. */
.retreat-reel { width: min(1100px,calc(100% - 2.5rem)); margin: 0 auto; }
.retreat-reel-viewport { overflow: hidden; border-radius: 22px; background: #e8e2d2; box-shadow: 0 28px 70px rgba(68,53,28,.15); }
.retreat-reel-track { display: flex; transition: transform .9s var(--motion-ease); will-change: transform; }
.retreat-reel-slide { position: relative; flex: 0 0 100%; min-width: 0; margin: 0; aspect-ratio: 16/9; background: #ded9ca; }
.retreat-reel-slide img { display: block; width: 100%; height: 100%; object-fit: cover; }
.retreat-reel-slide:first-child img { object-position: center 34%; }
.retreat-reel-slide figcaption { position: absolute; left: clamp(1rem,3vw,2.3rem); bottom: clamp(1rem,3vw,2.3rem); color: white; background: rgba(40,37,30,.5); backdrop-filter: blur(8px); border-radius: 99px; padding: .5rem .9rem; font: 600 .72rem var(--font-sans,Montserrat,sans-serif); letter-spacing: .18em; }
.retreat-reel-controls { display: flex; justify-content: space-between; align-items: center; gap: 1rem; padding: 1.2rem .2rem 0; color: var(--color-nav-text,#5d2304); font: 600 .76rem var(--font-sans,Montserrat,sans-serif); letter-spacing: .16em; }
.retreat-reel-actions { display: flex; gap: .55rem; }
.retreat-reel-actions button { display: grid; place-items: center; width: 48px; height: 48px; border: 1px solid currentColor; border-radius: 50%; color: var(--color-nav-text,#5d2304); background: transparent; cursor: pointer; font-size: 1.2rem; transition: color .3s ease, background .3s ease, transform .3s var(--motion-ease); }
.retreat-reel-actions button:hover:not(:disabled) { background: var(--color-nav-text,#5d2304); color: white; transform: scale(1.07); }
.retreat-reel-actions button:disabled { opacity: .35; cursor: default; }
.motion-site .ar-card { transition: transform .55s var(--motion-ease), box-shadow .55s ease, background-color .55s ease; }
.motion-site .ar-card:hover { transform: translateY(-9px); background: #fffaf0; box-shadow: 0 18px 36px rgba(91,69,35,.12); }

/* Eventos y blog: fotografías y titulares, sin interferir con sus modales. */
.motion-site .eventos-item .servicio-image { box-shadow: 0 28px 65px rgba(61,45,22,.17); }
.motion-site .blogs-intro { position: relative; overflow: hidden; }
.motion-site .blogs-intro::after { content: ''; position: absolute; width: clamp(230px,32vw,480px); aspect-ratio: 1; border: 1px solid rgba(255,255,255,.23); border-radius: 50%; right: -8%; top: -35%; box-shadow: 0 0 0 44px rgba(255,255,255,.035),0 0 0 88px rgba(255,255,255,.025); pointer-events: none; animation: motion-orbit 16s ease-in-out infinite alternate; }
@keyframes motion-orbit { to { transform: translate(-4%,7%) rotate(12deg); } }
.motion-site .blogs-intro-inner { position: relative; z-index: 1; }
.motion-site .blogs-intro h1 { text-wrap: balance; }
.motion-site .blog-card { overflow: hidden; transition: transform .55s var(--motion-ease), box-shadow .55s ease; }
.motion-site .blog-card:hover { transform: translateY(-10px); box-shadow: 0 24px 48px rgba(70,53,34,.14); }
.motion-site .blog-card img { transition: transform .8s var(--motion-ease), filter .8s ease !important; }
.motion-site .blog-card:hover img { transform: scale(1.055); filter: saturate(1.13); }
.motion-site .blog-card h2, .motion-site .blog-card h3 { text-wrap: balance; }
.motion-site .blog-modal:not([hidden]) .blog-modal-backdrop { animation: motion-fade .36s ease both; }
.motion-site .blog-modal:not([hidden]) .blog-modal-dialog { animation: motion-modal-in .55s var(--motion-ease) both; }
@keyframes motion-fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes motion-modal-in { from { opacity: 0; transform: translateY(24px) scale(.97); } to { opacity: 1; transform: none; } }

/* En formularios y calendario, el movimiento señala estado y respuesta. */
.motion-site .cal-day:not(:disabled), .motion-site .cal-hour-btn, .motion-site .cal-service-card { transition: transform .25s var(--motion-ease), background-color .25s ease, box-shadow .25s ease; }
.motion-site .cal-day:not(:disabled):hover, .motion-site .cal-hour-btn:hover, .motion-site .cal-service-card:hover { transform: translateY(-2px); }
.motion-site :focus-visible { outline: 3px solid #e1a02b; outline-offset: 4px; }

@media (max-width: 700px) {
  .motion-site .motion-hero::after { height: 28px; bottom: 13px; }
  .motion-site .motion-chapter::before { padding: 0 1.3rem; }
  .motion-site .motion-chapter::after { display: none; }
  .motion-site .motion-media { clip-path: inset(0 0 9% 0 round 14px); }
  .motion-site .motion-media.is-visible { clip-path: inset(0 round 14px); }
  .retreat-reel-slide { aspect-ratio: 4/5; }
  .retreat-reel-slide:first-child img { object-position: center; }
  .retreat-reel-actions button { width: 42px; height: 42px; }
  .motion-site .blogs-intro::after { right: -40%; top: -12%; }
}
@media (prefers-reduced-motion: reduce) {
  .motion-progress { display: none; }
  .motion-site .motion-hero > .hero-bg, .motion-site .motion-hero > .servicios-hero-bg,
  .motion-site .motion-hero > .hero-overlay, .motion-site .motion-hero > .servicios-hero-overlay,
  .motion-site .motion-hero .hero-content > *, .motion-site .motion-hero .servicios-hero-content > *,
  .motion-site .blog-modal:not([hidden]) .blog-modal-backdrop, .motion-site .blog-modal:not([hidden]) .blog-modal-dialog { animation: none !important; opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .motion-site .motion-heading, .motion-site .motion-media, .motion-site .motion-chapter .servicio-content { opacity: 1 !important; transform: none !important; filter: none !important; clip-path: none !important; }
  .motion-site .motion-media::after, .motion-site .motion-hero::after { display: none; }
  .motion-site .motion-media img { transform: none !important; }
  .retreat-reel-track { transition: none; }
}
.motion-site .about-section, .motion-site .services-intro { position: relative; }
.motion-smile { position: absolute; width: clamp(34px,4.5vw,64px); height: auto; top: clamp(1.2rem,3vw,3rem); right: clamp(1.2rem,5vw,6rem); opacity: .42; pointer-events: none; user-select: none; transform: rotate(-16deg); animation: motion-smile-float 7s ease-in-out infinite alternate; }
.motion-site .blogs-intro .motion-smile { filter: brightness(0) invert(1); opacity: .4; right: 6%; bottom: 9%; top: auto; z-index: 1; }
@keyframes motion-smile-float { to { transform: translateY(-12px) rotate(11deg); } }
@media (max-width: 700px) { .motion-smile { width: 32px; top: 1rem; right: 1.2rem; opacity: .32; } }
@media (prefers-reduced-motion: reduce) { .motion-smile { animation: none; transform: none; } }
/* El número de capítulo exterior sustituye al repetido junto al título. */
.motion-site .service-story.motion-chapter .service-story-number,
.motion-site .eventos-item.motion-chapter .eventos-number { display: none; }
.retreat-reel-slide:last-child { background: #e9e3d4; }
.retreat-reel-slide:last-child img { object-fit: contain; }
