/* Kroniki Arivalda — Efekty v1.4.0: static background + compositor-friendly text motion. */
.kae-preloader {
  position: fixed;
  inset: 0;
  z-index: 2147482000;
  box-sizing: border-box;
  padding: 24px 16px;
  display: grid;
  place-items: center;
  overflow: hidden;
  isolation: isolate;
  background: radial-gradient(ellipse at center, #1c1812 0%, #0f0e0b 48%, #080807 100%);
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .38s ease-out, visibility .38s ease-out;
}
html.kae-loader-active .kae-preloader {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}
.kae-preloader::before, .kae-preloader::after {
  content: "";
  position: absolute;
  inset: 18px;
  border: 1px solid rgba(175, 141, 93, .16);
  pointer-events: none;
}
.kae-preloader::after {
  inset: 27px;
  border-color: rgba(175, 141, 93, .055);
}
.kae-preloader__inner {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: clamp(20px, 3vh, 30px);
  width: min(94vw, 850px);
  text-align: center;
}
.kae-preloader__title {
  display: grid;
  justify-items: center;
  gap: clamp(3px, 1vh, 9px);
  /* System serif avoids a remote font swap in the middle of the intro. */
  font-family: Georgia, 'Times New Roman', serif;
  font-weight: bold;
  line-height: 1.12;
  letter-spacing: .13em;
  color: #e5c795;
  text-shadow: 0 2px 15px rgba(196, 139, 73, .14);
}
.kae-preloader__line {
  display: block;
  max-width: 100%;
  font-size: clamp(35px, 7.4vw, 82px);
  text-indent: .13em;
  opacity: 0;
  transform: translate3d(0, 14px, 0);
  backface-visibility: hidden;
  will-change: opacity, transform;
}
.kae-preloader__line--two { font-size: clamp(35px, 7.8vw, 86px); }
 .kae-preloader__line--one {
  animation: kae-intro-rise .68s cubic-bezier(.22,.75,.3,1) .06s both;
}
 .kae-preloader__line--two {
  animation: kae-intro-rise .68s cubic-bezier(.22,.75,.3,1) .17s both;
}
.kae-preloader__rule {
  height: 1px;
  width: min(53vw, 300px);
  background: linear-gradient(90deg, transparent, #a57e4b 18%, #e2c392 50%, #a57e4b 82%, transparent);
  opacity: 0;
  transform: scaleX(.75);
  will-change: opacity, transform;
}
 .kae-preloader__rule {
  animation: kae-intro-rule .52s ease-out .32s both;
}
@keyframes kae-intro-rise {
  from { opacity: 0; transform: translate3d(0, 14px, 0); }
  to { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes kae-intro-rule {
  from { opacity: 0; transform: scaleX(.75); }
  to { opacity: .95; transform: scaleX(1); }
}
/* Original, working back-to-top retained from version 1.0. */
.kae-back-to-top {position:fixed;right:22px;bottom:25px;z-index:75;width:48px;height:48px;border:1px solid rgba(191,154,93,.66);border-radius:8px;color:#e4dac7;background:linear-gradient(155deg,#292216,#14110c);box-shadow:0 6px 24px rgba(0,0,0,.45),inset 0 0 0 3px rgba(190,151,88,.07);display:grid;place-items:center;cursor:pointer;opacity:0;visibility:hidden;pointer-events:none;transform:translateY(9px);transition:opacity .24s ease,visibility .24s ease,transform .24s ease,border-color .24s ease,box-shadow .24s ease;}
.kae-back-to-top svg {width:23px;height:23px;}
.kae-back-to-top.kae-is-visible {opacity:1;visibility:visible;pointer-events:auto;transform:translateY(0);}
.kae-back-to-top:hover,.kae-back-to-top:focus-visible {border-color:#c3a06c;color:#f2e6d4;box-shadow:0 5px 22px rgba(177,138,85,.25);}
.kae-back-to-top:focus-visible {outline:2px solid #f4d59f;outline-offset:3px;}
@media (max-width:650px) {.kae-back-to-top {right:14px;bottom:16px;width:43px;height:43px;}}
/* Theme owns data-animate behavior: amplify only its arrival, don't create a competing observer. */
body.kae-reveal-on [data-animate].is-visible {animation:kae-cinematic-reveal .65s cubic-bezier(.2,.7,.2,1) both;}
body.kae-reveal-on .kae-reveal-item.kae-is-visible {animation:kae-cinematic-reveal .65s cubic-bezier(.2,.7,.2,1) both;}
@keyframes kae-cinematic-reveal {0% {opacity:.05;transform:translateY(18px);}100% {opacity:1;transform:translateY(0);}}
body.kae-reveal-off [data-animate], body.kae-reveal-off .fade-in-up {opacity:1!important;transform:none!important;transition:none!important;animation:none!important;filter:none!important;}
/* Boost only hover surfaces, never force animation on touch, no new pseudo-elements. */
@media (hover:hover) and (pointer:fine) {
 body.kae-buttons-on .site-shell :is(a.button,button.button,.wp-block-button__link,.product-card-button,.read-listen-card .button) {transition-property:background,border-color,box-shadow,color,transform;transition-duration:.24s;}
 body.kae-buttons-on .site-shell :is(a.button,button.button,.wp-block-button__link,.product-card-button,.read-listen-card .button):hover {border-color:#d1a96f;box-shadow:inset 0 0 0 1px rgba(225,177,99,.22),0 0 26px rgba(203,149,66,.28),0 13px 28px rgba(0,0,0,.35);text-shadow:0 0 14px rgba(242,205,144,.35);}
 body.kae-buttons-on .site-shell :is(a.button,button.button,.wp-block-button__link,.product-card-button,.read-listen-card .button):focus-visible {outline:2px solid #d1a96f;outline-offset:3px;}
}
/* 1.4.0: lightweight mobile reveal without double-running the theme transition
   and plugin keyframe on the same element. Never blank out whole sections. */
@media (max-width:1023px), (hover:none) and (pointer:coarse) {
  /* Keep offscreen content legible even before an observer can run. */
  body.kae-reveal-on [data-animate] {
    opacity: .84;
    transform: translate3d(0, 8px, 0);
    transition: opacity .34s ease-out, transform .34s ease-out;
    animation: none;
  }
  /* A section is an entire content area; avoid dark gaps while scrolling.
     Animate its child cards/headings rather than hiding their parent. */
  body.kae-reveal-on .section[data-animate] {
    opacity: 1;
    transform: none;
    transition: none;
  }
  /* Titles of sections gently reveal with the section itself. */
  body.kae-reveal-on .section[data-animate] > .section-heading {
    opacity: .93;
    transition: opacity .34s ease-out;
  }
  body.kae-reveal-on .section[data-animate].is-visible > .section-heading {
    opacity: 1;
  }
  body.kae-reveal-on [data-animate].is-visible {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
  body.kae-reveal-on .kae-reveal-item {
    opacity: .84;
    transform: translate3d(0, 8px, 0);
    transition: opacity .34s ease-out, transform .34s ease-out;
  }
  body.kae-reveal-on .kae-reveal-item.kae-is-visible {
    opacity: 1;
    transform: none;
    animation: none !important;
  }
}

@media (max-width:520px) {
  .kae-preloader::before {inset:12px;}
  .kae-preloader::after {inset:19px;}
  .kae-preloader__line--one {font-size:clamp(33px,9.8vw,48px);letter-spacing:.09em;text-indent:.09em;}
  .kae-preloader__line--two {font-size:clamp(32px,10vw,49px);letter-spacing:.09em;text-indent:.09em;}
  .kae-preloader__rule {width:min(62vw,260px);}
}
@media (prefers-reduced-motion:reduce) {
 .kae-preloader {display:none!important;transition:none!important;}
 .kae-back-to-top {transition:none!important;}
 body.kae-reveal-on [data-animate].is-visible,body.kae-reveal-on .kae-reveal-item.kae-is-visible {animation:none!important;opacity:1!important;transform:none!important;filter:none!important;}
 body.kae-reveal-off [data-animate] {animation:none!important;opacity:1!important;transform:none!important;}
 body.kae-buttons-on .site-shell :is(a.button,button.button,.wp-block-button__link,.product-card-button) {transition:none!important;}
}
