/* ==========================================================
   DG Brickwork — page loader
   The lockup's own Flemish-bond courses are laid brick by brick
   (bed joint first, quoins first, bottom course up), then the DG
   sets, the name rises, and the screen lifts off the hero.
   Driven by js/loader.js; everything here is keyed off .ldr.
   ========================================================== */
.ldr {
  position: fixed; inset: 0; z-index: 1000; display: grid; place-items: center;
  background: #0E0F11; color: #F2F2F0;
  transition: transform 1s cubic-bezier(.76, 0, .24, 1), opacity .4s ease .7s;
}
.ldr.is-out { transform: translateY(-100%); opacity: 0; }
.ldr__art { width: min(560px, 82vw); overflow: visible; transform: scale(var(--zoom, 1.45)); }
/* camera: close on the courses while they're laid, then pull out to the full lockup */
.ldr.is-on .ldr__art { animation: ldr-pull 1.25s cubic-bezier(.65, 0, .35, 1) var(--pull) forwards; }
@keyframes ldr-pull { to { transform: scale(1); } }
@media (max-width: 560px) { .ldr__art { --zoom: 1.1; } }

/* bricks: each one dropped onto its bed with a small settle */
.ldr__brick {
  opacity: 0; transform-box: fill-box; transform-origin: 50% 100%;
  transform: translateY(-34%) scaleY(1.06);
}
.ldr.is-on .ldr__brick { animation: ldr-lay .42s cubic-bezier(.34, 1.5, .5, 1) var(--d) forwards; }
/* headers are picked out darker while wet, then dry back to the brand blue (see the Flemish bond reference) */
.ldr__brick.is-header { fill: #3E6F9F; }
.ldr.is-on .ldr__brick.is-header { animation: ldr-lay .42s cubic-bezier(.34, 1.5, .5, 1) var(--d) forwards, ldr-dry .9s ease calc(var(--d) + .45s) forwards; }
@keyframes ldr-lay {
  0%   { opacity: 0; transform: translateY(-34%) scaleY(1.06); }
  45%  { opacity: 1; }
  100% { opacity: 1; transform: none; }
}
@keyframes ldr-dry { to { fill: #6FA3D6; } }

/* bed joint: a line of mortar spread just ahead of each course */
.ldr__bed { stroke: rgba(242, 242, 240, .32); stroke-width: 1.4; stroke-linecap: round; stroke-dasharray: var(--len); stroke-dashoffset: var(--len); opacity: 1; }
.ldr.is-on .ldr__bed { animation: ldr-spread .32s ease-out var(--d) forwards, ldr-fade .5s ease calc(var(--d) + .5s) forwards; }
@keyframes ldr-spread { to { stroke-dashoffset: 0; } }
@keyframes ldr-fade { to { opacity: 0; } }

/* the DG builds up from its base, like the courses beside it */
.ldr__dgclip { transform: scaleY(0); transform-box: fill-box; transform-origin: 50% 100%; }
.ldr.is-on .ldr__dgclip { animation: ldr-rise .75s cubic-bezier(.65, 0, .35, 1) var(--d) forwards; }
@keyframes ldr-rise { to { transform: scaleY(1); } }

/* the name settles in last */
.ldr__word { opacity: 0; transform: translateY(5%); transform-box: fill-box; }
.ldr.is-on .ldr__word { animation: ldr-word .8s cubic-bezier(.16, 1, .3, 1) var(--d) forwards; }
@keyframes ldr-word { to { opacity: 1; transform: none; } }

/* hold the page still (and its entrance animations paused) until the loader lifts */
html.is-loading { overflow: hidden; }
html.is-loading .hero *, html.is-loading .hero { animation-play-state: paused !important; }

@media (prefers-reduced-motion: reduce) { .ldr { display: none; } }
