/* Page loader: the logo in a ring, covering the page until it has loaded.
   Markup + the script that lifts it sit right after <body> on every page:

       <div class="site-loader" aria-hidden="true">…</div>
       <script>…adds .is-done on load, 3 s at the latest…</script>

   The 4 s animation below is the safety net: if that script never runs, the
   loader still fades away by itself, so it can never block the page. */
.site-loader {
    position: fixed;
    inset: 0;
    z-index: 10000;
    display: grid;
    place-items: center;
    background: var(--color-canvas, #fff);
    animation: site-loader-out .45s ease 4s forwards;
}
.site-loader.is-done {
    opacity: 0;
    visibility: hidden;
    transition: opacity .45s ease, visibility 0s linear .45s;
    animation: none;
}

.site-loader__mark {
    position: relative;
    width: 112px;
    height: 112px;
    display: grid;
    place-items: center;
}
.site-loader__logo {
    width: 52px;
    height: auto;
    animation: site-loader-breathe 1.8s ease-in-out infinite;
}
/* A sienna arc on a pale sage track, turning around the logo. */
.site-loader__mark::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: 50%;
    border: 3px solid var(--color-ivory-tint, #d6e9e0);
    border-top-color: var(--color-sienna, #984216);
    animation: site-loader-spin 1s linear infinite;
}

@keyframes site-loader-spin { to { transform: rotate(360deg); } }
@keyframes site-loader-breathe { 50% { transform: scale(.92); opacity: .85; } }
@keyframes site-loader-out { to { opacity: 0; visibility: hidden; } }

@media (prefers-reduced-motion: reduce) {
    .site-loader__mark::before { animation-duration: 2.4s; }
    .site-loader__logo { animation: none; }
}
