/* HM - movimento e interação (Hortelã Magenta 2026-11). Só é ativo com html.hm-motion (JS) e sem "reduzir movimento". */

/* grelha das experiências: flexbox em vez de floats (um cartão com mais texto prendia o seguinte e deixava buracos) */
#experiences .grid{display:flex;flex-wrap:wrap;align-items:flex-start}
#experiences .grid>.experience .cover{height:auto;padding-bottom:0;margin-bottom:24px}
#experiences .grid>.experience .cover a{display:block}
#experiences .grid>.experience .cover img{margin-bottom:0}
#experiences .grid:before,#experiences .grid:after{display:none}
#experiences .grid>.experience{float:none}

/* entrada ao fazer scroll */
.hm-motion [data-hm-reveal]{opacity:0;transform:translate3d(0,32px,0);transition:opacity .9s cubic-bezier(.16,.84,.3,1),transform .9s cubic-bezier(.16,.84,.3,1);transition-delay:var(--hm-d,0ms)}
.hm-motion [data-hm-reveal="fade"]{transform:none}
.hm-motion [data-hm-reveal="left"]{transform:translate3d(-40px,0,0)}
.hm-motion [data-hm-reveal="right"]{transform:translate3d(40px,0,0)}
.hm-motion [data-hm-reveal="pop"]{transform:scale(.82)}
.hm-motion [data-hm-reveal].hm-in{opacity:1;transform:none}

/* título do hero: entra palavra a palavra */
.hm-motion .hm-word{display:inline-block;opacity:0;transform:translate3d(0,.6em,0);transition:opacity .8s cubic-bezier(.16,.84,.3,1),transform .8s cubic-bezier(.16,.84,.3,1);transition-delay:var(--hm-d,0ms)}
.hm-motion .hm-in .hm-word{opacity:1;transform:none}

/* fotografias de fundo do hero: zoom lento (efeito Ken Burns) */
.hm-kb-host{position:relative;overflow:hidden}
.hm-kb{position:absolute;top:0;right:0;bottom:0;left:0;z-index:0;background-size:cover;background-repeat:no-repeat;background-position:center;transform:scale(1.02);transform-origin:60% 40%;pointer-events:none}
.hm-motion .hm-kb{animation:hm-kb 16s ease-out forwards}
/* slideshow da página inicial: zoom controlado por slide (JS) - começa quando o slide entra e só volta ao início depois de sair do ecrã */
.hm-motion #slideshow .hm-kb{animation:none;transform:scale(1.02);transition:none}
.hm-motion #slideshow .hm-kb.hm-kb-on{transform:scale(1.1);transition:transform 7s cubic-bezier(.25,.1,.25,1)}
@keyframes hm-kb{from{transform:scale(1.02)}to{transform:scale(1.12)}}

/* cartões das experiências: zoom na foto, título e seta */
.experience .cover{overflow:hidden;border-radius:5px}
.experience .cover img{display:block;transition:transform 1.1s cubic-bezier(.16,.84,.3,1),filter .6s ease}
.experience:hover .cover img{transform:scale(1.08);filter:saturate(1.12)}
.experience h4{transition:color .3s ease}
.experience:hover h4{color:#7d0023}

/* categorias (carrossel): zoom na foto dentro do cartão */
#categories .glide__slide a,.experiences .header #filters .glide__slide .inner{overflow:hidden;border-radius:5px;display:block}
#categories .glide__slide img,.experiences .header #filters .glide__slide .inner img{transition:transform 1s cubic-bezier(.16,.84,.3,1)}
#categories .glide__slide:hover img,.experiences .header #filters .glide__slide:hover .inner img{transform:scale(1.1)}

/* ícones (destaques, serviços incluídos, contactos): pequeno salto ao passar o rato */
#highligths .icon svg,#highligths .icon img,.feature .icon svg,#services-experiences .icon svg{transition:transform .5s cubic-bezier(.34,1.56,.64,1)}
#highligths .col-6:hover .icon svg,#highligths .col-6:hover .icon img,.feature:hover .icon svg,#services-experiences .col-6:hover .icon svg{transform:translateY(-6px) scale(1.08)}

/* fotografias com paralaxe (usa "translate", independente do "transform" do tema) */
.hm-motion [data-hm-parallax]{will-change:translate}

/* fotografias empilhadas (página inicial, serviços, quem somos): abrem em leque quando aparecem */
.service-pic.backwards-left,.service-pic.backwards-right{transition:translate 1.4s cubic-bezier(.16,.84,.3,1) .25s,rotate 1.4s cubic-bezier(.16,.84,.3,1) .25s,box-shadow .6s ease}
.service-pic.upfront{transition:opacity .9s cubic-bezier(.16,.84,.3,1),transform .9s cubic-bezier(.16,.84,.3,1),box-shadow .6s ease}
.hm-motion .service-pic.upfront.hm-in{box-shadow:0 18px 40px rgba(52,47,46,.22)}
@media (min-width:768px){
.hm-motion .service-pic.upfront.hm-in~.backwards-left{translate:-16% 7%;rotate:-6deg;box-shadow:0 10px 30px rgba(52,47,46,.18)}
.hm-motion .service-pic.upfront.hm-in~.backwards-right{translate:16% -5%;rotate:5deg;box-shadow:0 10px 30px rgba(52,47,46,.18)}
.hm-motion .service-pic.upfront.hm-in:hover~.backwards-left{translate:-22% 9%;rotate:-9deg}
.hm-motion .service-pic.upfront.hm-in:hover~.backwards-right{translate:22% -7%;rotate:8deg}
}

/* rotas tracejadas da marca (hero das experiências, formulário): o tracejado avança, o avião flutua, os pins balançam */
.hm-motion .hero .graphic path[stroke-dasharray],.hm-motion .contact-form-bg-shape path[stroke-dasharray]{animation:hm-march 4s linear infinite}
@keyframes hm-march{to{stroke-dashoffset:-40}}
.hm-motion .contact-form-bg-shape svg>g>path:first-child{transform-box:fill-box;transform-origin:center;animation:hm-plane 3.2s ease-in-out infinite}
@keyframes hm-plane{0%,100%{transform:translate(0,0) rotate(0)}50%{transform:translate(6px,-5px) rotate(-6deg)}}
.hm-motion .contact-form-bg-shape svg>g>path:nth-child(3),.hm-motion .hero .graphic svg>g>path:first-child{transform-box:fill-box;transform-origin:50% 100%;animation:hm-pin 2.6s ease-in-out infinite}
@keyframes hm-pin{0%,100%{transform:translateY(0)}50%{transform:translateY(-4px)}}

/* página de cada experiência: degradê escuro atrás do título, preço e texto (canto inferior esquerdo) para melhor leitura */
.hero.hm-hero-text .cover{position:relative}
.hero.hm-hero-text .cover:before{content:"";position:absolute;top:0;right:0;bottom:0;left:0;z-index:6;pointer-events:none;
  background:linear-gradient(to top,rgba(0,0,0,.62) 0%,rgba(0,0,0,.38) 32%,rgba(0,0,0,0) 62%),
             linear-gradient(to right,rgba(0,0,0,.38) 0%,rgba(0,0,0,.18) 38%,rgba(0,0,0,0) 62%)}
@media (max-width:767px){.hero.hm-hero-text .cover:before{background:linear-gradient(to top,rgba(0,0,0,.7) 0%,rgba(0,0,0,.45) 45%,rgba(0,0,0,.1) 80%)}}

/* os pins sobem um pouco acima do desenho: o SVG não pode cortar o que sai dos limites */
.hero .graphic svg,.contact-form-bg-shape svg{overflow:visible}

/* botões e links com seta */
.button{transition:background-color .3s ease,border-color .3s ease,color .3s ease,transform .3s ease,box-shadow .3s ease}
.button:hover{transform:translateY(-2px);box-shadow:0 8px 20px rgba(191,1,54,.25)}

/* galeria da experiência */
#gallery a,#gallery .col-4,#gallery .col-6{overflow:hidden}
#gallery img{transition:transform 1s cubic-bezier(.16,.84,.3,1)}
#gallery a:hover img,#gallery div:hover>img{transform:scale(1.06)}

@media (prefers-reduced-motion:reduce){
  .hm-motion [data-hm-reveal],.hm-motion .hm-word{opacity:1!important;transform:none!important;transition:none!important}
  .hm-kb,.hero .graphic path,.contact-form-bg-shape path{animation:none!important}
  .experience:hover .cover img,#categories .glide__slide:hover img,#gallery img{transform:none!important}
}
