/* DBR2 FX-Studie — E1–E7 (toggle via html.fx-e1 … html.fx-e7)
   Rules: no-JS = fully visible; prefers-reduced-motion = no motion;
   mobile ≤820px: no section/image reveals below hero. Lenis not included. */

/* -------------------------------------------------------------------------- */
/* E1 — Hero entrance (once on load)                                           */
/* -------------------------------------------------------------------------- */
@keyframes fx-e1-hero-zoom {
  from { transform: scale(1.04); }
  to { transform: scale(1); }
}
@keyframes fx-e1-hero-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .img-slot-hero .img-slot-inner {
  transform-origin: center center;
  animation: fx-e1-hero-zoom 1.2s ease-out both;
}
/* LCP: img stays visible from first paint; only scale the inner wrapper */
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .kicker,
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy h1,
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .lead,
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .cta-row {
  opacity: 0;
  transform: translateY(12px);
  animation: fx-e1-hero-in .5s ease-out forwards;
}
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .kicker { animation-delay: 0ms; }
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy h1 { animation-delay: 80ms; }
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .lead { animation-delay: 160ms; }
html.fx-js.fx-e1:not(.fx-reduced) .hero-bleed .hero-copy .cta-row { animation-delay: 240ms; }

/* -------------------------------------------------------------------------- */
/* E2 — Quiet section reveals (replaces draft fx-reveal 28px/850ms)            */
/* -------------------------------------------------------------------------- */
@media (min-width: 821px) {
  html.fx-js.fx-e2:not(.fx-reduced) .fx-reveal {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity .5s ease-out, transform .5s ease-out;
  }
  html.fx-js.fx-e2:not(.fx-reduced) .fx-reveal.is-visible {
    opacity: 1;
    transform: none;
  }
  /* Kill old staggered delays from style.css when E2 is on */
  html.fx-js.fx-e2:not(.fx-reduced) .pillar-grid .fx-reveal:nth-child(n),
  html.fx-js.fx-e2:not(.fx-reduced) .persons .fx-reveal:nth-child(n) {
    transition-delay: 0s;
  }
}
@media (max-width: 820px) {
  html.fx-e2 .fx-reveal {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* E3 — Image clip-path reveal (real photos only)                              */
/* -------------------------------------------------------------------------- */
@media (min-width: 821px) {
  html.fx-js.fx-e3:not(.fx-reduced) .fx-img-reveal .img-slot-inner,
  html.fx-js.fx-e3:not(.fx-reduced) .fx-img-reveal.book-photo img {
    clip-path: inset(100% 0 0 0);
    transition: clip-path .7s ease-out;
  }
  html.fx-js.fx-e3:not(.fx-reduced) .fx-img-reveal.is-visible .img-slot-inner,
  html.fx-js.fx-e3:not(.fx-reduced) .fx-img-reveal.book-photo.is-visible img {
    clip-path: inset(0);
  }
}
@media (max-width: 820px) {
  html.fx-e3 .fx-img-reveal .img-slot-inner,
  html.fx-e3 .fx-img-reveal.book-photo img {
    clip-path: none !important;
    transition: none !important;
  }
}

/* -------------------------------------------------------------------------- */
/* E4 — Quote stage: whitespace + word reveal                                  */
/* -------------------------------------------------------------------------- */
html.fx-e4 .quote-block {
  padding-block: max(96px, clamp(3.5rem, 8vw, 6rem));
}
html.fx-js.fx-e4:not(.fx-reduced) .quote-block .fx-word {
  display: inline-block;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .45s ease-out, transform .45s ease-out;
}
html.fx-js.fx-e4:not(.fx-reduced) .quote-block.is-visible .fx-word {
  opacity: 1;
  transform: none;
}

/* -------------------------------------------------------------------------- */
/* E5 — Fine link / button interaction                                         */
/* -------------------------------------------------------------------------- */
html.fx-e5 a.more,
html.fx-e5 .pillar-card .more,
html.fx-e5 .team-row-cta .btn,
html.fx-e5 .li-link,
html.fx-e5 .foot-nav a,
html.fx-e5 .person .p-contact a {
  background-image: linear-gradient(currentColor, currentColor);
  background-position: 0 100%;
  background-repeat: no-repeat;
  background-size: 0% 1.5px;
  text-decoration: none;
  transition: background-size .25s ease, color .2s ease, gap .25s ease, padding .25s ease;
}
html.fx-e5 a.more:hover,
html.fx-e5 a.more:focus-visible,
html.fx-e5 .pillar-card .more:hover,
html.fx-e5 .pillar-card .more:focus-visible,
html.fx-e5 .foot-nav a:hover,
html.fx-e5 .foot-nav a:focus-visible,
html.fx-e5 .person .p-contact a:hover,
html.fx-e5 .person .p-contact a:focus-visible {
  background-size: 100% 1.5px;
  text-decoration: none;
}
/* “Zur …” arrow nudge */
html.fx-e5 a.more [aria-hidden="true"],
html.fx-e5 a.more .link-tail [aria-hidden="true"] {
  display: inline-block;
  transition: transform .25s ease;
}
html.fx-e5 a.more:hover [aria-hidden="true"],
html.fx-e5 a.more:focus-visible [aria-hidden="true"],
html.fx-e5 a.more:hover .link-tail [aria-hidden="true"],
html.fx-e5 a.more:focus-visible .link-tail [aria-hidden="true"] {
  transform: translateX(4px);
}
/* Buttons: keep base lift/shadow from style.css; E5 only adds underline to text links */

/* -------------------------------------------------------------------------- */
/* E6 — Page transitions (keep @view-transition; name header; content fade)    */
/* -------------------------------------------------------------------------- */
html.fx-e6 .site-head-wrap {
  view-transition-name: dbr2-site-head;
}
html.fx-e6 main#main {
  view-transition-name: dbr2-main;
}
html.fx-e6::view-transition-old(dbr2-main),
html.fx-e6::view-transition-new(dbr2-main) {
  animation-duration: .2s;
  animation-timing-function: ease;
}
html.fx-e6::view-transition-old(dbr2-main) {
  animation-name: fx-e6-fade-out;
}
html.fx-e6::view-transition-new(dbr2-main) {
  animation-name: fx-e6-fade-in;
}
@keyframes fx-e6-fade-out {
  to { opacity: 0; }
}
@keyframes fx-e6-fade-in {
  from { opacity: 0; }
}

/* -------------------------------------------------------------------------- */
/* E7 — Cleanup draft A/E polish                                               */
/* -------------------------------------------------------------------------- */
/* Header: solid surface + 1px line (no liquid-glass blur / scroll-p) */
html.fx-e7 .site-head-wrap::before {
  background: rgba(251, 250, 248, .98) !important;
  -webkit-backdrop-filter: none !important;
  backdrop-filter: none !important;
}
html.fx-e7 .site-head-wrap {
  border-bottom: 1px solid rgba(42, 35, 38, .12);
  box-shadow: none !important;
}
html.fx-e7 .site-head-wrap.scrolled,
html.fx-e7 .site-head-wrap.scrolled-deep {
  border-bottom-color: rgba(42, 35, 38, .14);
  box-shadow: none !important;
}
/* Kill scroll-coupled color shifts */
html.fx-e7 body.scrolled-past-hero,
html.fx-e7 body.t-dbr2.scrolled-past-hero {
  background: var(--cream, #faf6f1);
}
html.fx-e7 body.scrolled-past-hero h1 em,
html.fx-e7 body.scrolled-past-hero .kicker,
html.fx-e7 body.scrolled-past-hero .trust-band {
  color: inherit;
  background: inherit;
}
html.fx-e7 {
  --scroll-p: 0 !important;
}
/* No hover lift / glow */
html.fx-e7 .btn:hover,
html.fx-e7 .btn:focus-visible,
html.fx-e7 .btn:active,
html.fx-e7 .pillar-card:hover,
html.fx-e7 .trust-card:hover,
html.fx-e7 .prog:hover,
html.fx-e7 .trust-list li:hover,
html.fx-e7 .contact-fab:hover {
  transform: none !important;
  box-shadow: none !important;
}
html.fx-e7 .pillar-card:hover {
  border-color: rgba(127, 0, 34, .18);
}
/* CTA band: flat surface instead of gradient */
html.fx-e7 .cta-band,
html.fx-e7 .cta-band.is-visible {
  background: var(--berry, #7F0022) !important;
}

/* -------------------------------------------------------------------------- */
/* Global reduced-motion + no-JS safety                                        */
/* -------------------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
  html.fx-e1 .hero-bleed .img-slot-hero .img-slot-inner,
  html.fx-e1 .hero-bleed .hero-copy .kicker,
  html.fx-e1 .hero-bleed .hero-copy h1,
  html.fx-e1 .hero-bleed .hero-copy .lead,
  html.fx-e1 .hero-bleed .hero-copy .cta-row,
  html.fx-e2 .fx-reveal,
  html.fx-e3 .fx-img-reveal .img-slot-inner,
  html.fx-e3 .fx-img-reveal.book-photo img,
  html.fx-e4 .quote-block .fx-word {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
    clip-path: none !important;
  }
  html.fx-e6::view-transition-old(dbr2-main),
  html.fx-e6::view-transition-new(dbr2-main),
  html.fx-e6::view-transition-old(root),
  html.fx-e6::view-transition-new(root) {
    animation: none !important;
  }
}
