/**
 * Kupetz home v7.0 — restrained, TEST-only microinteractions.
 * Layer on the existing approved heritage design: no layout, text, image,
 * carousel, checkout or product-card-preview overrides.
 * No element is hidden pending JavaScript or IntersectionObserver.
 */
body.kcv20-chrome.kcv15-home {
  --kcv70-motion-ease: cubic-bezier(.2, .75, .24, 1);
  --kcv70-gold-glint: rgba(246, 214, 156, .32);
  --kcv70-gold-focus: #c79855;
}

/* Section entrance is purely additive: before JS adds the class the page
 * is fully visible and functional. The observer removes itself after reveal. */
@keyframes kcv70-arrive {
  from { opacity: .84; transform: translate3d(0, 12px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
body.kcv20-chrome.kcv15-home :is(
  .kcv48-heading,
  .kcv30-section-heading,
  .kcv20-news__heading,
  .kcv20-benefits
).kcv70-motion-enter {
  animation: kcv70-arrive 560ms var(--kcv70-motion-ease) both;
}
/* Separate a brief fade from panel transforms. The old entrance animation
 * retained transform: translate3d(0,0,0) via fill-mode: both, preventing a
 * shared hover scale from working consistently across all four panels. */
@keyframes kcv71-panel-arrive {
  from { opacity: .84; }
  to   { opacity: 1; }
}
body.kcv20-chrome.kcv15-home .kcv49-feature-grid.kcv70-motion-enter > section {
  animation: kcv71-panel-arrive 600ms var(--kcv70-motion-ease) both;
}
body.kcv20-chrome.kcv15-home .kcv49-feature-grid.kcv70-motion-enter > section:nth-child(2) {
  animation-delay: 85ms;
}

/* Reflected light travels over the image ONLY when someone deliberately
 * hovers or keyboard-focuses a category link; never over the category text. */
body.kcv20-chrome.kcv15-home .kcv48-category__photo {
  position: relative;
}
body.kcv20-chrome.kcv15-home .kcv48-category__photo::after {
  content: "";
  position: absolute;
  z-index: 1;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    110deg,
    transparent 34%,
    rgba(255, 241, 207, .06) 42%,
    var(--kcv70-gold-glint) 49%,
    rgba(255, 241, 207, .06) 56%,
    transparent 64%
  );
  transform: translate3d(-145%, 0, 0) skewX(-12deg);
}
@media (hover: hover) and (pointer: fine) {
  body.kcv20-chrome.kcv15-home
    .kcv48-category:hover .kcv48-category__photo::after {
    transform: translate3d(145%, 0, 0) skewX(-12deg);
    transition: transform 720ms var(--kcv70-motion-ease);
  }
  /* One hover behaviour for the four *visible* shells.
   * Story/Gifts draw their frame on section; Budget/Corporate on an inner
   * element. Styling only "> section" affected two shells differently. */
  body.kcv20-chrome.kcv15-home :is(
    .kcv49-feature-grid--story > section,
    .kcv49-feature-grid--offers .kcv48-budget__body,
    .kcv49-feature-grid--offers .kcv48-corporate__inner
  ):hover {
    transform: scale(1.008);
    box-shadow: 0 8px 26px rgba(78, 25, 34, .2),
                0 0 0 1px rgba(198, 152, 85, .55);
  }
}

/* The same base transition and focus highlight belong to each visible
 * panel, irrespective of the different outer section wrappers.
 * No transform is applied until a true fine-pointer hover occurs. */
body.kcv20-chrome.kcv15-home :is(
  .kcv49-feature-grid--story > section,
  .kcv49-feature-grid--offers .kcv48-budget__body,
  .kcv49-feature-grid--offers .kcv48-corporate__inner
) {
  transition: transform 300ms var(--kcv70-motion-ease), box-shadow 300ms ease;
}
body.kcv20-chrome.kcv15-home :is(
  .kcv49-feature-grid--story > section,
  .kcv49-feature-grid--offers .kcv48-budget__body,
  .kcv49-feature-grid--offers .kcv48-corporate__inner
):focus-within {
  box-shadow: 0 8px 26px rgba(78, 25, 34, .2),
              0 0 0 1px rgba(198, 152, 85, .55);
}

/* Premium call-to-action feedback for editorial/hero links, not for
 * native WooCommerce add-to-cart buttons or the mobile header controls. */
body.kcv20-chrome.kcv15-home :is(
  .kcv48-hero-actions,
  .kcv49-feature-grid
) .kcv20-btn {
  transition: box-shadow 230ms ease, transform 230ms var(--kcv70-motion-ease);
}
@media (hover: hover) and (pointer: fine) {
  body.kcv20-chrome.kcv15-home :is(
    .kcv48-hero-actions,
    .kcv49-feature-grid
  ) .kcv20-btn:hover {
    transform: translate3d(0, -2px, 0);
    box-shadow: 0 7px 18px rgba(43, 10, 22, .28),
                inset 0 0 0 1px rgba(250, 213, 157, .4);
  }
  body.kcv20-chrome.kcv15-home
    .kcv48-budget__choice > span {
    display: inline-block;
    transition: transform 200ms var(--kcv70-motion-ease);
  }
  body.kcv20-chrome.kcv15-home
    .kcv48-budget__choice:hover > span {
    transform: translateX(4px);
  }
}
body.kcv20-chrome.kcv15-home :is(
  .kcv48-category,
  .kcv48-budget__choice,
  .kcv48-hero-actions .kcv20-btn,
  .kcv49-feature-grid .kcv20-btn
):focus-visible {
  outline: 2px solid var(--kcv70-gold-focus);
  outline-offset: 4px;
}
body.kcv20-chrome.kcv15-home
  .kcv48-category:focus-visible .kcv48-category__photo::after {
  transform: translate3d(145%, 0, 0) skewX(-12deg);
  transition: transform 720ms var(--kcv70-motion-ease);
}

/* Mobile UI should not react to simulated hover events or introduce motion
 * while the visitor is scrolling and swiping news/hero carousels. */
@media (max-width: 700px) {
  body.kcv20-chrome.kcv15-home .kcv49-feature-grid.kcv70-motion-enter > section {
    animation-duration: 420ms;
    animation-delay: 0ms;
  }
}
@media (prefers-reduced-motion: reduce) {
  body.kcv20-chrome.kcv15-home :is(
    .kcv48-heading,
    .kcv30-section-heading,
    .kcv20-news__heading,
    .kcv20-benefits
  ).kcv70-motion-enter,
  body.kcv20-chrome.kcv15-home
    .kcv49-feature-grid.kcv70-motion-enter > section {
    animation: none;
  }
  body.kcv20-chrome.kcv15-home .kcv48-category__photo::after {
    display: none;
    transition: none;
  }
  body.kcv20-chrome.kcv15-home :is(
    .kcv48-hero-actions,
    .kcv49-feature-grid
  ) .kcv20-btn,
  body.kcv20-chrome.kcv15-home :is(
    .kcv49-feature-grid--story > section,
    .kcv49-feature-grid--offers .kcv48-budget__body,
    .kcv49-feature-grid--offers .kcv48-corporate__inner
  ),
  body.kcv20-chrome.kcv15-home .kcv48-budget__choice > span {
    transition: none;
  }
  body.kcv20-chrome.kcv15-home :is(
    .kcv49-feature-grid--story > section,
    .kcv49-feature-grid--offers .kcv48-budget__body,
    .kcv49-feature-grid--offers .kcv48-corporate__inner
  ):hover {
    transform: none;
  }
  body.kcv20-chrome.kcv15-home :is(
    .kcv48-hero-actions,
    .kcv49-feature-grid
  ) .kcv20-btn:hover {
    transform: none;
  }
}
