/**
 * Print Assistant — Motion & material surfaces (Phase 4)
 */

/* --- Scroll reveal --- */

/* Cover heroes: background must stay visible; reveal only inner copy */
.wp-block-cover.pa-home-hero,
.wp-block-cover.pa-hub-hero {
  opacity: 1;
  transform: none;
  color: var(--wp--preset--color--contrast);
}

.pa-reveal {
  opacity: 0;
  transform: translateY(var(--pa-reveal-distance));
  transition:
    opacity var(--pa-reveal-duration) var(--pa-ease-print),
    transform var(--pa-reveal-duration) var(--pa-ease-print);
  will-change: opacity, transform;
}

.pa-reveal.is-revealed {
  opacity: 1;
  transform: translateY(0);
}

.pa-reveal-group > .pa-reveal:nth-child(1) { transition-delay: 0ms; }
.pa-reveal-group > .pa-reveal:nth-child(2) { transition-delay: 60ms; }
.pa-reveal-group > .pa-reveal:nth-child(3) { transition-delay: 120ms; }
.pa-reveal-group > .pa-reveal:nth-child(4) { transition-delay: 180ms; }
.pa-reveal-group > .pa-reveal:nth-child(5) { transition-delay: 240ms; }
.pa-reveal-group > .pa-reveal:nth-child(n+6) { transition-delay: 300ms; }

/* --- Production cards (print stack) --- */

.is-style-pa-production-card,
.pa-production-card {
  position: relative;
  transition:
    background-color var(--pa-transition-base),
    border-color var(--pa-transition-base),
    box-shadow var(--pa-transition-base),
    transform var(--pa-transition-base);
}

.is-style-pa-production-card::before,
.is-style-pa-production-card::after,
.pa-production-card::before,
.pa-production-card::after {
  content: "";
  position: absolute;
  width: 8px;
  height: 8px;
  pointer-events: none;
  opacity: 0.45;
  transition: opacity var(--pa-transition-fast);
}

.is-style-pa-production-card::before,
.pa-production-card::before {
  top: var(--wp--preset--spacing--30);
  left: var(--wp--preset--spacing--30);
  border-top: 1px solid var(--wp--preset--color--line);
  border-left: 1px solid var(--wp--preset--color--line);
}

.is-style-pa-production-card::after,
.pa-production-card::after {
  top: var(--wp--preset--spacing--30);
  right: var(--wp--preset--spacing--30);
  border-top: 1px solid var(--wp--preset--color--line);
  border-right: 1px solid var(--wp--preset--color--line);
}

.is-style-pa-production-card:hover,
.pa-production-card:hover {
  background-color: color-mix(in srgb, var(--wp--preset--color--paper-dark) 55%, transparent);
  border-top-color: var(--pa-color-interaction);
  border-top-width: 2px;
  box-shadow: var(--pa-shadow-stack);
  transform: translateY(-2px);
}

.is-style-pa-production-card:hover::before,
.is-style-pa-production-card:hover::after,
.pa-production-card:hover::before,
.pa-production-card:hover::after {
  opacity: 0.85;
}

.is-style-pa-card,
.pa-card {
  transition:
    box-shadow var(--pa-transition-base),
    transform var(--pa-transition-base),
    background-color var(--pa-transition-base);
}

.is-style-pa-card:hover,
.pa-card:hover {
  box-shadow: var(--pa-shadow-sheet);
  transform: translateY(-1px);
}

body.pa-digitale-loesungen-page .pa-digitale-loesungen-card.is-style-pa-card,
body.pa-digitale-loesungen-page .pa-digitale-loesungen-card.pa-card,
body.pa-kontakt-page .pa-digitale-loesungen-card.is-style-pa-card,
body.pa-kontakt-page .pa-digitale-loesungen-card.pa-card {
  transform: none;
}

/* Specimen badges / tags — same lift language as editorial cards */
@media (hover: hover) and (pointer: fine) {
  .pa-home-warum-tag:hover,
  .pa-digitale-loesungen-domain-badge:hover {
    background-color: var(--wp--preset--color--paper-dark, #e7e1d7);
    border-color: color-mix(in srgb, var(--wp--preset--color--contrast) 18%, var(--wp--preset--color--line));
    box-shadow:
      inset 3px 0 0 0 var(--wp--preset--color--accent-9, #c7a000),
      var(--pa-shadow-stack);
    transform: translateY(-2px);
  }
}

/* --- Images --- */

.pa-object-with-shadows,
.wp-block-post-featured-image img,
.entry-content .wp-block-image img,
.wp-block-image img {
  transition:
    transform var(--pa-transition-base),
    box-shadow var(--pa-transition-base);
}

.pa-object-with-shadows:hover,
.wp-block-post-featured-image:hover img,
.entry-content .wp-block-image:hover img {
  box-shadow: var(--pa-shadow-sheet);
  transform: scale(1.01);
}

/* --- Links — eine Unterstreichung (Gradient, kein text-decoration-Stack) --- */

.wp-block-navigation .wp-block-navigation-item__content {
  text-decoration: none;
  background-image: none;
}

.entry-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link),
.entry-content li > a:not(.wp-block-button__link),
.wp-block-post-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link),
.wp-block-post-content li > a:not(.wp-block-button__link),
.pa-home-hero a:not(.wp-block-button__link) {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 100% 1px;
  text-decoration: none;
  transition:
    color var(--pa-transition-fast),
    background-image var(--pa-transition-fast);
}

.entry-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link):hover,
.entry-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link):focus-visible,
.entry-content li > a:not(.wp-block-button__link):hover,
.entry-content li > a:not(.wp-block-button__link):focus-visible,
.wp-block-post-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link):hover,
.wp-block-post-content p:not(.pa-sidebar-block__action):not(.pa-tool-card__action):not(.pa-hub-card__action) > a:not(.wp-block-button__link):focus-visible,
.wp-block-post-content li > a:not(.wp-block-button__link):hover,
.wp-block-post-content li > a:not(.wp-block-button__link):focus-visible,
.pa-home-hero a:not(.wp-block-button__link):hover,
.pa-home-hero a:not(.wp-block-button__link):focus-visible {
  background-image: linear-gradient(var(--pa-color-interaction), var(--pa-color-interaction));
  background-size: 100% 1px;
  color: var(--pa-color-interaction);
  text-decoration: none;
}

/* Production cards: single underline on hover (no theme.json + gradient stack) */
.pa-production-card a:not(.wp-block-button__link),
.is-style-pa-production-card a:not(.wp-block-button__link) {
  background-image: none;
  text-decoration: none;
}

.pa-production-card a:not(.wp-block-button__link):hover,
.is-style-pa-production-card a:not(.wp-block-button__link):hover {
  background-image: none;
  background-size: 0;
  color: var(--pa-color-interaction);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.12em;
}

.pa-production-card .pa-hub-card__action a:hover,
.pa-production-card .pa-hub-card__action a:focus-visible,
.is-style-pa-production-card .pa-hub-card__action a:hover,
.is-style-pa-production-card .pa-hub-card__action a:focus-visible {
  text-decoration: none;
}

/* --- Buttons (press) --- */

.is-style-pa-button-technical .wp-block-button__link,
.is-style-pa-button-cta .wp-block-button__link,
aside.is-style-section-3 .wp-block-buttons .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link,
.wp-block-buttons.is-content-justification-center .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link,
.wp-block-button.is-style-outline .wp-block-button__link {
  transition:
    transform var(--pa-transition-fast),
    box-shadow var(--pa-transition-fast),
    background-color var(--pa-transition-fast),
    border-color var(--pa-transition-fast),
    color var(--pa-transition-fast);
}

.is-style-pa-button-technical .wp-block-button__link:active,
.is-style-pa-button-cta .wp-block-button__link:active,
aside.is-style-section-3 .wp-block-buttons .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link:active,
.wp-block-buttons.is-content-justification-center .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link:active,
.wp-block-button.is-style-outline .wp-block-button__link:active {
  transform: translateY(1px);
  box-shadow: var(--pa-shadow-pressed);
}

.is-style-pa-button-technical .wp-block-button__link:hover,
.is-style-pa-button-cta .wp-block-button__link:hover,
aside.is-style-section-3 .wp-block-buttons .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link:hover,
.wp-block-buttons.is-content-justification-center .wp-block-button:not(.is-style-outline):not(.is-style-pa-button-technical) .wp-block-button__link:hover {
  box-shadow: var(--pa-shadow-sheet);
}

/* --- Hero banner --- */

.hero-banner {
  box-shadow: var(--pa-shadow-sheet);
  transition: box-shadow var(--pa-transition-slow);
}

.hero-banner:hover {
  box-shadow: var(--pa-shadow-stack);
}

/* --- Archive / posts --- */

article.post,
article.page {
  transition: opacity var(--pa-reveal-duration) var(--pa-ease-print);
}

article.post.pa-reveal,
article.page.pa-reveal {
  /* inherits .pa-reveal */
}

@media (prefers-reduced-motion: reduce) {
  .pa-reveal {
    opacity: 1;
    transform: none;
    transition: none;
    will-change: auto;
  }

  .pa-reveal-group > .pa-reveal {
    transition-delay: 0ms;
  }

  .is-style-pa-production-card:hover,
  .pa-production-card:hover,
  .is-style-pa-card:hover,
  .pa-card:hover,
  .pa-home-warum-tag:hover,
  .pa-digitale-loesungen-domain-badge:hover,
  .pa-object-with-shadows:hover,
  .wp-block-post-featured-image:hover img,
  .entry-content .wp-block-image:hover img {
    transform: none;
  }
}
