/* =====================================================================
   Daravoria Medical — motion and transitions (added in 1.1.0, 2026-11-16)

   Rules this file follows:
   - Content is never hidden without JavaScript: the "reveal" class is only added by
     assets/js/motion.js, so if scripts fail everything shows normally.
   - Every animation is switched off when the visitor's device asks for reduced motion,
     or when they tick "Reduce animations and movement" in the Accessibility panel
     (html[data-reader-motion]).
   - Movement is short and gentle; nothing flashes, loops fast, or blocks reading.

   Contents
   1. Scroll reveal
   2. Page-load hero entrance
   3. Header on scroll
   4. Buttons and cards
   5. Footer call-to-action signal
   6. Coverage board beacon and zones
   7. Reduced motion (device setting and site option)
   ===================================================================== */

/* 1. Scroll reveal ------------------------------------------------------ */
.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition:
    opacity .7s cubic-bezier(.2, .7, .2, 1),
    transform .7s cubic-bezier(.2, .7, .2, 1);
  transition-delay: var(--reveal-delay, 0ms);
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}

/* 2. Page-load hero entrance -------------------------------------------- */
@keyframes daravoria-rise {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@keyframes daravoria-fade-scale {
  from { opacity: 0; transform: scale(.97); }
  to   { opacity: 1; transform: none; }
}
.js .hero .eyebrow,
.js .hero h1,
.js .hero .lede,
.js .hero .hero-actions,
.js .hero .hero-proof,
.js .products-hero .eyebrow,
.js .products-hero h1,
.js .product-detail-hero h1,
.js .product-detail-hero .product-strap {
  animation: daravoria-rise .8s cubic-bezier(.2, .7, .2, 1) both;
}
.js .hero h1,
.js .products-hero h1,
.js .product-detail-hero h1 { animation-delay: .08s; }
.js .hero .lede,
.js .product-detail-hero .product-strap { animation-delay: .18s; }
.js .hero .hero-actions { animation-delay: .28s; }
.js .hero .hero-proof { animation-delay: .38s; }
.js .hero-media,
.js .page-hero-image,
.js .services-hero-image,
.js .product-detail-hero__image img {
  animation: daravoria-fade-scale 1s cubic-bezier(.2, .7, .2, 1) .15s both;
}

/* 3. Header on scroll ---------------------------------------------------- */
.site-header {
  transition: box-shadow .3s ease, background-color .3s ease;
}
.header-inner,
.site-branding img {
  transition: min-height .3s ease, width .3s ease, height .3s ease;
}
.site-header.is-scrolled {
  box-shadow: 0 8px 26px rgba(var(--rgb-navy), .12);
}
@media (min-width: 801px) {
  .site-header.is-scrolled .header-inner {
    min-height: 68px;
  }
  .site-header.is-scrolled .site-branding img {
    width: 150px;
    height: 52px;
  }
}

/* 4. Buttons and cards --------------------------------------------------- */
.button {
  transition: background-color .2s ease, color .2s ease, border-color .2s ease, transform .15s ease, box-shadow .2s ease;
}
.button:hover {
  box-shadow: 0 8px 18px rgba(var(--rgb-navy), .18);
}
/* Visible "press" so people know the click registered. */
.button:active,
.featured-card:active,
.card--link:active,
.contact-card:active,
.coverage-call:active {
  transform: translateY(1px) scale(.98);
  box-shadow: none;
}
.product-card__image img {
  transition: transform .6s cubic-bezier(.2, .7, .2, 1);
}
.product-card:hover .product-card__image img {
  transform: scale(1.05);
}
/* Arrow nudges forward on hover. */
.card__more [aria-hidden],
.featured-card__cta [aria-hidden],
.button [aria-hidden] {
  display: inline-block;
  transition: transform .2s ease;
}
.card--link:hover .card__more [aria-hidden],
.featured-card:hover .featured-card__cta [aria-hidden],
.button:hover [aria-hidden] {
  transform: translateX(4px);
}

/* 5. Footer call-to-action signal (markup existed in footer.php but had no styles) */
.cta .split {
  align-items: center;
}
.cta-action {
  position: relative;
  display: grid;
  min-height: 220px;
  place-items: center;
  isolation: isolate;
}
.cta-orbit {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  border: 2px dashed rgba(var(--rgb-white), .35);
  animation: daravoria-spin 38s linear infinite;
}
.cta-orbit--one {
  width: 220px;
  height: 220px;
}
.cta-orbit--two {
  width: 150px;
  height: 150px;
  border-color: rgba(var(--rgb-gold-soft), .55);
  animation-duration: 26s;
  animation-direction: reverse;
}
.cta-signal {
  position: absolute;
  z-index: -1;
  top: 18px;
  display: flex;
  align-items: flex-end;
  gap: 5px;
  height: 34px;
}
.cta-signal span {
  width: 5px;
  height: 30%;
  border-radius: 3px;
  background: rgba(var(--rgb-white), .7);
  animation: daravoria-signal 1.6s ease-in-out infinite;
}
.cta-signal span:nth-child(2) { animation-delay: .15s; }
.cta-signal span:nth-child(3) { animation-delay: .3s; background: var(--gold-soft); }
.cta-signal span:nth-child(4) { animation-delay: .45s; }
.cta-signal span:nth-child(5) { animation-delay: .6s; }
@keyframes daravoria-spin {
  to { transform: rotate(360deg); }
}
@keyframes daravoria-signal {
  0%, 100% { height: 25%; }
  40% { height: 100%; }
  60% { height: 45%; }
}

/* 6. Coverage board beacon and zones -------------------------------------- */
.coverage-network__beacon::after {
  position: absolute;
  inset: -6px;
  content: "";
  border-radius: 50%;
  border: 2px solid var(--gold);
  animation: daravoria-beacon 2.4s ease-out infinite;
}
@keyframes daravoria-beacon {
  from { opacity: .9; transform: scale(.6); }
  to   { opacity: 0; transform: scale(2.4); }
}
.coverage-network.reveal .zone-tile {
  opacity: 0;
  transform: translateY(14px);
  transition: opacity .5s ease, transform .5s ease, background .25s ease, border-color .25s ease;
  transition-delay: calc(var(--i, 0) * 90ms + 200ms);
}
.coverage-network.reveal.is-visible .zone-tile {
  opacity: 1;
  transform: none;
}

/* 7. Reduced motion ------------------------------------------------------ */
/* Device setting ("reduce motion" in Windows, macOS, iOS, Android). */
@media (prefers-reduced-motion: reduce) {
  .reveal,
  .coverage-network.reveal .zone-tile {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .cta-orbit,
  .cta-signal span,
  .coverage-network__beacon::after {
    animation: none !important;
  }
}
/* Site option: Accessibility → "Reduce animations and movement". */
html[data-reader-motion] {
  scroll-behavior: auto !important;
}
html[data-reader-motion] *,
html[data-reader-motion] *::before,
html[data-reader-motion] *::after {
  animation: none !important;
  transition: none !important;
}
html[data-reader-motion] .reveal,
html[data-reader-motion] .coverage-network.reveal .zone-tile {
  opacity: 1 !important;
  transform: none !important;
}
html[data-reader-motion] .parallax-band__image {
  background-attachment: scroll;
}
html[data-reader-motion] .card:hover,
html[data-reader-motion] .featured-card:hover,
html[data-reader-motion] .product-card:hover,
html[data-reader-motion] .zone-tile:hover,
html[data-reader-motion] .product-card:hover .product-card__image img,
html[data-reader-motion] .featured-card:hover .featured-card__image img,
html[data-reader-motion] .hero-media--photo:hover > img {
  transform: none !important;
}
