/**
 * Homepage motion — HelixMed front page only.
 * Scoped to `.vt-homepage`. Duration/delay tokens for reveal and interaction.
 */

.vt-homepage {
  --vt-home-reveal-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --vt-home-reveal-y: 16px;
  --vt-home-reveal-y-sm: 12px;
  --vt-home-reveal-y-mobile: 8px;

  --vt-home-hero-title-duration: 500ms;
  --vt-home-hero-cta-duration: 500ms;
  --vt-home-hero-cta-delay: 100ms;
  --vt-home-hero-transition-duration: 600ms;

  --vt-home-intro-duration: 550ms;
  --vt-home-sector-duration: 500ms;
  --vt-home-sector-stagger: 80ms;
  --vt-home-sector-hover-duration: 250ms;

  --vt-home-products-duration: 500ms;
  --vt-home-products-carousel-delay: 80ms;
  --vt-home-carousel-scroll-ms: 400ms;

  --vt-home-contact-duration: 500ms;
  --vt-home-form-focus-duration: 180ms;

  --vt-home-logos-duration: 450ms;

  --vt-home-news-duration: 500ms;
  --vt-home-news-stagger: 70ms;
  --vt-home-news-hover-duration: 250ms;

  --vt-home-control-duration: 200ms;

  --vt-home-stagger-max-mobile: 60ms;
}

/* Hero crossfade uses existing slide opacity transition. */
.vt-homepage .vt-home-hero {
  --vt-home-hero-transition-duration: 600ms;
}

/* -------------------------------------------------------------------------- */
/* Reveal base — only after JS enables `.vt-motion-enabled`                   */
/* -------------------------------------------------------------------------- */

.vt-homepage.vt-motion-enabled [data-vt-reveal] {
  opacity: 0;
  transform: translate3d(0, var(--vt-home-reveal-y), 0);
  transition:
    opacity var(--vt-home-reveal-duration, 500ms) var(--vt-home-reveal-ease),
    transform var(--vt-home-reveal-duration, 500ms) var(--vt-home-reveal-ease);
  transition-delay: var(--vt-home-reveal-delay, 0ms);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal].is-revealed {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="hero-title"] {
  --vt-home-reveal-y: var(--vt-home-reveal-y-sm);
  --vt-home-reveal-duration: var(--vt-home-hero-title-duration);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="hero-cta"] {
  --vt-home-reveal-y: var(--vt-home-reveal-y-sm);
  --vt-home-reveal-duration: var(--vt-home-hero-cta-duration);
  --vt-home-reveal-delay: var(--vt-home-hero-cta-delay);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="intro"] {
  --vt-home-reveal-duration: var(--vt-home-intro-duration);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="sector"] {
  --vt-home-reveal-duration: var(--vt-home-sector-duration);
  --vt-home-reveal-delay: calc(
    var(--vt-home-reveal-index, 0) * var(--vt-home-sector-stagger)
  );
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="products-title"] {
  --vt-home-reveal-duration: var(--vt-home-products-duration);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="products-carousel"] {
  --vt-home-reveal-duration: var(--vt-home-products-duration);
  --vt-home-reveal-delay: var(--vt-home-products-carousel-delay);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="contact-visual"],
.vt-homepage.vt-motion-enabled [data-vt-reveal="contact-form"] {
  --vt-home-reveal-y: var(--vt-home-reveal-y-sm);
  --vt-home-reveal-duration: var(--vt-home-contact-duration);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="logos"] {
  --vt-home-reveal-duration: var(--vt-home-logos-duration);
}

.vt-homepage.vt-motion-enabled [data-vt-reveal="news-card"] {
  --vt-home-reveal-duration: var(--vt-home-news-duration);
  --vt-home-reveal-delay: calc(
    var(--vt-home-reveal-index, 0) * var(--vt-home-news-stagger)
  );
}

/* Layout-neutral wrappers separating reveal from slider/marquee transforms. */
.vt-homepage .vt-home-featured-categories__reveal,
.vt-homepage .vt-home-partner-logos__reveal {
  display: block;
  width: 100%;
  min-width: 0;
}

/* -------------------------------------------------------------------------- */
/* Sector image hover (linked cards only, fine pointer + hover)               */
/* -------------------------------------------------------------------------- */

.vt-homepage .vt-home-business-sectors__card--linked .vt-home-business-sectors__image {
  transform: scale(1);
  transition: transform var(--vt-home-sector-hover-duration) var(--vt-home-reveal-ease);
}

@media (hover: hover) and (pointer: fine) {
  .vt-homepage .vt-home-business-sectors__card--linked:hover .vt-home-business-sectors__image,
  .vt-homepage .vt-home-business-sectors__card--linked:focus-within .vt-home-business-sectors__image {
    transform: scale(1.025);
  }
}

/* -------------------------------------------------------------------------- */
/* News card hover — clip zoom on media only                                  */
/* -------------------------------------------------------------------------- */

.vt-homepage .vt-home-news .vt-news-card__image {
  transform: scale(1);
  transition: transform var(--vt-home-news-hover-duration) var(--vt-home-reveal-ease);
}

.vt-homepage .vt-home-news .vt-news-card__title-link {
  transition: color var(--vt-home-news-hover-duration) var(--vt-home-reveal-ease);
}

@media (hover: hover) and (pointer: fine) {
  .vt-homepage .vt-home-news .vt-news-card__media:hover .vt-news-card__image,
  .vt-homepage .vt-home-news .vt-news-card__media:focus-visible .vt-news-card__image {
    transform: scale(1.025);
  }

  .vt-homepage .vt-home-news .vt-news-card:hover .vt-news-card__title-link,
  .vt-homepage .vt-home-news .vt-news-card:focus-within .vt-news-card__title-link {
    color: var(--vt-color-brand);
  }
}

/* -------------------------------------------------------------------------- */
/* Contact form focus border                                                  */
/* -------------------------------------------------------------------------- */

.vt-homepage .vt-contact-form-block--home .vt-contact-form-block__form .ff-el-form-control,
.vt-homepage .vt-contact-form-block--home .vt-contact-form-block__form textarea.ff-el-form-control {
  border: 1px solid transparent;
  transition:
    border-color var(--vt-home-form-focus-duration) var(--vt-home-reveal-ease),
    outline-color var(--vt-home-form-focus-duration) var(--vt-home-reveal-ease),
    box-shadow var(--vt-home-form-focus-duration) var(--vt-home-reveal-ease);
}

.vt-homepage .vt-contact-form-block--home .vt-contact-form-block__form .ff-el-form-control:focus,
.vt-homepage .vt-contact-form-block--home .vt-contact-form-block__form textarea.ff-el-form-control:focus {
  border-color: var(--vt-color-brand);
  outline: 2px solid var(--vt-color-focus);
  outline-offset: 2px;
}

/* -------------------------------------------------------------------------- */
/* Buttons / links — homepage control feedback                                */
/* -------------------------------------------------------------------------- */

.vt-homepage .vt-home-hero__cta,
.vt-homepage .vt-home-hero__dot,
.vt-homepage .vt-home-business-sectors__link,
.vt-homepage .vt-home-featured-categories__control,
.vt-homepage .vt-home-news__more-link,
.vt-homepage .vt-home-news__control,
.vt-homepage .vt-contact-form-block--home .ff-btn-submit {
  transition-duration: var(--vt-home-control-duration);
}

.vt-homepage .vt-home-hero__cta {
  transition:
    background-color var(--vt-home-control-duration) var(--vt-motion-ease),
    box-shadow var(--vt-home-control-duration) var(--vt-motion-ease),
    filter var(--vt-home-control-duration) var(--vt-motion-ease),
    opacity var(--vt-home-hero-cta-duration) var(--vt-home-reveal-ease),
    transform var(--vt-home-hero-cta-duration) var(--vt-home-reveal-ease);
  transition-delay: 0ms, 0ms, 0ms, var(--vt-home-reveal-delay, 0ms), var(--vt-home-reveal-delay, 0ms);
}

.vt-homepage .vt-home-business-sectors__link {
  transition: color var(--vt-home-control-duration) var(--vt-motion-ease);
}

.vt-homepage .vt-home-news__more-link {
  transition: color var(--vt-home-control-duration) var(--vt-motion-ease);
}

.vt-homepage .vt-home-featured-categories__control,
.vt-homepage .vt-home-news__control {
  transition:
    background-color var(--vt-home-control-duration) var(--vt-motion-ease),
    color var(--vt-home-control-duration) var(--vt-motion-ease),
    border-color var(--vt-home-control-duration) var(--vt-motion-ease);
}

.vt-homepage .vt-contact-form-block--home .ff-btn-submit {
  transition:
    background var(--vt-home-control-duration) var(--vt-motion-ease),
    filter var(--vt-home-control-duration) var(--vt-motion-ease),
    opacity var(--vt-home-control-duration) var(--vt-motion-ease);
}

/* Product category cards on home: no lift / image zoom / extra pointer cues. */
.vt-homepage .vt-product-category-card--home .vt-product-category-card__image {
  transform: none;
  transition: none;
}

/* -------------------------------------------------------------------------- */
/* Mobile: shorter travel, capped stagger                                     */
/* -------------------------------------------------------------------------- */

@media (max-width: 768px) {
  .vt-homepage {
    --vt-home-reveal-y: var(--vt-home-reveal-y-mobile);
    --vt-home-reveal-y-sm: var(--vt-home-reveal-y-mobile);
    --vt-home-sector-stagger: var(--vt-home-stagger-max-mobile);
    --vt-home-news-stagger: var(--vt-home-stagger-max-mobile);
    --vt-home-products-carousel-delay: var(--vt-home-stagger-max-mobile);
    --vt-home-hero-cta-delay: 0ms;
  }
}

/* -------------------------------------------------------------------------- */
/* Reduced motion — show everything, no travel/zoom                           */
/* -------------------------------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  .vt-homepage {
    --vt-home-reveal-y: 0px;
    --vt-home-reveal-y-sm: 0px;
    --vt-home-reveal-y-mobile: 0px;
    --vt-home-sector-stagger: 0ms;
    --vt-home-news-stagger: 0ms;
    --vt-home-products-carousel-delay: 0ms;
    --vt-home-hero-cta-delay: 0ms;
  }

  .vt-homepage.vt-motion-enabled [data-vt-reveal],
  .vt-homepage.vt-motion-enabled [data-vt-reveal].is-revealed {
    opacity: 1;
    transform: none;
    transition: none;
  }

  .vt-homepage .vt-home-business-sectors__card--linked .vt-home-business-sectors__image,
  .vt-homepage .vt-home-news .vt-news-card__image {
    transform: none !important;
    transition: none;
  }

  .vt-homepage .vt-home-hero {
    --vt-home-hero-transition-duration: 0ms;
  }

  .vt-homepage .vt-home-featured-categories__track,
  .vt-homepage .vt-home-news__track,
  .vt-homepage .vt-carousel__track {
    scroll-behavior: auto;
  }
}

.vt-homepage.vt-motion-reduced.vt-motion-enabled [data-vt-reveal],
.vt-homepage.vt-motion-reduced.vt-motion-enabled [data-vt-reveal].is-revealed {
  opacity: 1;
  transform: none;
  transition: none;
}

.vt-homepage.vt-motion-reduced .vt-home-business-sectors__card--linked .vt-home-business-sectors__image,
.vt-homepage.vt-motion-reduced .vt-home-news .vt-news-card__image {
  transform: none !important;
  transition: none;
}
