/* EDRAK moving sand & readability fix v5 — 2026-11-08
   Fix: sand ridge was under the caption and background-position was barely perceptible.
   Real time-based canvas grains now move over the lower wave only.
   Previous typography and CTA animation retained; reduced-motion fallback available.
   Exclusively on /work/edrak-advanced-web/ in both languages. */

/* A taller text-safe card. Added bottom room does not alter navigation/CTA links. */
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__card {
  min-height:clamp(708px,43vw,810px)!important;
  padding-bottom:clamp(138px,9.3vw,178px)!important;
  align-items:center!important;
}
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__copy {
  z-index:4!important;
  isolation:isolate;
}
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__actions {
  z-index:4!important;
}
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__copy>p {
  position:relative;
  z-index:4;
  max-width:54ch!important;
  color:#f6f4f0!important;
  line-height:1.85!important;
  text-shadow:0 2px 9px rgba(1,10,25,.40)!important;
}
/* Keep first and gold title as crisp phrases, no blur, no text duplication.
   Existing repeating vertical movement continues. */
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta h2,
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-title__first{
  filter:none!important;
}
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture{
  background:none!important;
  background-image:none!important;
  -webkit-mask-image:none!important;
  mask-image:none!important;
  opacity:1!important;
  z-index:0!important;
}
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::before {
  background-image:url("./edrak-next-chapter-gold-sand-v5.svg")!important;
  background-position:50% 50%!important;
  background-size:100% 100%!important;
  background-repeat:no-repeat!important;
  opacity:.96!important;
}
/* CSS grain layer remains for no-JS fallback; faster clear motion (was 65px/12s). */
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::after{
  background-image:
    radial-gradient(circle,rgba(255,208,123,.80) 0 1px,transparent 1.4px),
    radial-gradient(circle,rgba(255,226,170,.65) 0 1.2px,transparent 1.6px)!important;
  background-size:13px 12px,26px 24px!important;
  background-position:0 0,0 0;
  -webkit-mask-image:url("./edrak-next-chapter-sand-mask-v5.svg")!important;
  mask-image:url("./edrak-next-chapter-sand-mask-v5.svg")!important;
  -webkit-mask-size:100% 100%!important;
  mask-size:100% 100%!important;
  -webkit-mask-position:50% 50%!important;
  mask-position:50% 50%!important;
  -webkit-mask-repeat:no-repeat!important;
  mask-repeat:no-repeat!important;
}
@media(prefers-reduced-motion:no-preference){
 html body.tyz-site-v1:has(#edrak-project)
 .tyz6-footer-cta.tyz-edrak-chapter-playing .tyz6-footer-cta__texture::after{
  animation:edrak-moving-sand-v5-fallback 6s linear infinite!important;
 }
}
@keyframes edrak-moving-sand-v5-fallback {
  0% {background-position:0 0,0 0;opacity:.78;}
  50%{opacity:.95;}
  100%{background-position:-208px 120px,156px -96px;opacity:.78;}
}
/* Use an actual animated particle canvas when JavaScript is available;
   avoid double overlapping sand patterns and reduce static particle density. */
html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta.tyz-edrak-sand-canvas-ready
 .tyz6-footer-cta__texture::after{
  opacity:.17!important;
  animation:none!important;
}
html body.tyz-site-v1:has(#edrak-project) .tyz-edrak-sand-canvas-v5{
  position:absolute;inset:0;
  width:100%;height:100%;
  z-index:2;
  display:block;
  pointer-events:none;
  mix-blend-mode:screen;
}
@media(max-width:1100px){
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__card {
    min-height:clamp(640px,66vw,745px)!important;
    padding-bottom:clamp(125px,13vw,165px)!important;
  }
}
@media(max-width:850px) {
  /* Stacked headline and buttons: retain room at the bottom for the golden dune. */
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__card {
    min-height:0!important;
    padding-bottom:clamp(140px,23vw,200px)!important;
  }
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::before{
    background-size:auto 100%!important;
    background-position:48% 50%!important;
  }
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::after{
    -webkit-mask-size:auto 100%!important;
    mask-size:auto 100%!important;
    -webkit-mask-position:48% 50%!important;
    mask-position:48% 50%!important;
  }
}
@media(max-width:610px) {
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__card{
    min-height:0!important;
    padding:30px 20px 135px!important;
  }
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__copy>p{
    font-size:clamp(14px,3.6vw,17px)!important;
  }
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::before{
    background-position:48% 50%!important;
    opacity:.6!important;
  }
  html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::after{
    -webkit-mask-position:48% 50%!important;
    mask-position:48% 50%!important;
  }
}
@media(prefers-reduced-motion:reduce){
 html body.tyz-site-v1:has(#edrak-project) .tyz6-footer-cta__texture::after{
  animation:none!important;
  opacity:.75!important;
 }
}
