/* The Living reef: decorative artwork stays below every footer link and control. */
html[data-theme] .site-footer{padding-bottom:0}
.footer-reef{position:relative;isolation:isolate;height:clamp(150px,14vw,270px);overflow:hidden;pointer-events:none;contain:layout paint;--reef-pace:1;--reef-scale:1}
.footer-reef-bed{position:absolute;z-index:2;bottom:0;left:50%;width:100%;min-width:900px;max-width:none;height:auto;transform:translateX(-50%)}
.reef-fish{position:absolute;z-index:1;bottom:var(--depth);left:-80px;width:calc(var(--size)*var(--reef-scale));height:calc(var(--size)*var(--reef-scale));animation:reef-crossing calc(var(--duration)*var(--reef-pace)) linear var(--phase) infinite;animation-play-state:paused}
.reef-fish-body{display:block;width:100%;height:100%;background-image:url('/assets/decorations/reef-fish.webp');background-size:200% 200%;background-repeat:no-repeat;--facing:1;animation:reef-swimming var(--bob) ease-in-out var(--phase) infinite;animation-play-state:paused}
.fish-gold{background-position:0 0}.fish-blue{background-position:100% 0}.fish-clown{background-position:0 100%}.fish-pink{background-position:100% 100%}
.reef-fish-left{animation-direction:reverse}.reef-fish-left .reef-fish-body{--facing:-1}
.reef-bubble{position:absolute;z-index:3;left:var(--x);bottom:15px;width:var(--size);height:var(--size);border:1px solid #7bbde59c;border-radius:50%;background:radial-gradient(circle at 30% 25%,#ffffffbd 0 15%,#c3e8ff22 42%,#64b8e626 70%);animation:reef-bubble-rise var(--duration) linear var(--phase) infinite;animation-play-state:paused}
.footer-reef.is-swimming .reef-fish,.footer-reef.is-swimming .reef-fish-body,.footer-reef.is-swimming .reef-bubble{animation-play-state:running}
html.motion-paused .footer-reef .reef-fish,html.motion-paused .footer-reef .reef-fish-body,html.motion-paused .footer-reef .reef-bubble{animation-play-state:paused}
@keyframes reef-crossing{from{transform:translate3d(0,0,0)}to{transform:translate3d(calc(100vw + 160px),0,0)}}
@keyframes reef-swimming{0%,100%{transform:translateY(0) scaleX(var(--facing)) rotate(-3deg)}50%{transform:translateY(-9px) scaleX(calc(var(--facing)*.96)) rotate(3deg)}}
@keyframes reef-bubble-rise{0%{transform:translate(0,0);opacity:0}15%{opacity:.6}75%{opacity:.4}100%{transform:translate(15px,-170px);opacity:0}}
html[data-theme=dark] .footer-reef-bed{filter:brightness(.8) saturate(.92)}
html[data-theme=dark] .reef-fish-body{filter:brightness(.9)}
@media(max-width:760px){.footer-reef{--reef-pace:.6;--reef-scale:.8}.reef-fish:nth-of-type(n+7){display:none}}
@media(prefers-reduced-motion:reduce){.footer-reef .reef-fish{animation:none;left:var(--rest)}.footer-reef .reef-fish-body{animation:none;transform:scaleX(var(--facing))}.footer-reef .reef-bubble{display:none}}
