/* Anillo (Moxen) · OCB page loader. Everything is scoped under .mx-anillo. */
.mx-anillo {
  --mx-ink: var(--ink, #0A0A12);
  --mx-bone: var(--bone, #F2EFE8);
  --mx-muted: var(--muted, #9B98A8);
  --mx-violet: var(--violet, #6B4BFF);
  --mx-plasma: var(--plasma, #FF5B2E);
  --mx-amber: var(--amber, #FFB547);
  --mx-rail: .07;                      /* empty rail opacity */
  --mx-glow: .55;                      /* spark halo */
  --mx-size: min(340px, 74vw);
  --mx-ease: cubic-bezier(.22, 1, .36, 1);

  position: fixed; inset: 0; z-index: 100;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px;
  background: var(--mx-ink); color: var(--mx-bone);
  font-family: "Manrope", system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  transition: opacity .6s var(--mx-ease), transform .7s var(--mx-ease), visibility 0s linear 0s;
}
.mx-anillo *, .mx-anillo *::before, .mx-anillo *::after { box-sizing: border-box; }
/* a soft violet bloom behind the ring, same mood as the hero */
.mx-anillo::before {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(circle at 50% 46%, rgba(107, 75, 255, .16), transparent 42%);
}

.mx-anillo__ring { position: relative; width: var(--mx-size); height: var(--mx-size); }
.mx-anillo__canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }

.mx-anillo__center {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: calc(var(--mx-size) * .035);
}
.mx-anillo__logo {
  width: 44%; height: auto; overflow: visible; display: block;
  transition: transform .7s var(--mx-ease);
}
.mx-anillo__logo .mx-anillo__letter { fill: var(--mx-bone); }
.mx-anillo__logo .mx-anillo__arrow {
  opacity: .16; transform-box: fill-box; transform-origin: 82% 30%;
  transition: opacity .4s;
}

/* the rolling counter: columns of digits that anillo.js moves */
.mx-anillo__count {
  margin: 0; display: flex; align-items: flex-start;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-weight: 500;
  font-size: calc(var(--mx-size) * .105); letter-spacing: -.02em; line-height: 1;
  font-variant-numeric: tabular-nums; color: var(--mx-bone);
  transition: opacity .35s, transform .6s var(--mx-ease);
}
.mx-anillo__digits { display: flex; height: 1em; overflow: hidden; }
.mx-anillo__col { display: flex; flex-direction: column; will-change: transform; }
.mx-anillo__col span { height: 1em; display: block; }
.mx-anillo__count small { font-size: .5em; margin: .1em 0 0 .12em; letter-spacing: 0; color: var(--mx-muted); }

.mx-anillo__echo {
  position: absolute; inset: 9%; border-radius: 50%; border: 1px solid var(--mx-violet);
  opacity: 0; pointer-events: none;
}

.mx-anillo__label {
  position: relative; margin: 0;
  font-family: "JetBrains Mono", ui-monospace, monospace; font-size: 12px; font-weight: 500;
  letter-spacing: .22em; text-transform: uppercase; color: var(--mx-muted);
  transition: opacity .35s;
}
.mx-anillo__label::after { content: ""; display: inline-block; width: 1.5em; text-align: left; animation: mx-anillo-dots 1.4s steps(4, end) infinite; }
@keyframes mx-anillo-dots { 0% { content: ""; } 25% { content: "."; } 50% { content: ".."; } 75% { content: "..."; } }

/* done: the counter leaves, the logo settles into the centre, the
   arrow draws in and pulses, the ring beats once and a ripple goes out */
.mx-anillo.is-done .mx-anillo__count { opacity: 0; transform: translateY(-30%) scale(.9); }
.mx-anillo.is-done .mx-anillo__logo { transform: translateY(calc(var(--mx-size) * .075)) scale(1.12); }
.mx-anillo.is-done .mx-anillo__arrow { opacity: 1; animation: mx-anillo-draw .55s var(--mx-ease) .12s both, mx-anillo-pulse .7s var(--mx-ease) .62s; }
@keyframes mx-anillo-draw { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes mx-anillo-pulse {
  0% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 91, 46, 0)); }
  40% { transform: scale(1.14); filter: drop-shadow(0 0 10px rgba(255, 91, 46, .75)); }
  100% { transform: scale(1); filter: drop-shadow(0 0 0 rgba(255, 91, 46, 0)); }
}
.mx-anillo.is-done .mx-anillo__label { opacity: 0; }
.mx-anillo.is-done .mx-anillo__canvas { animation: mx-anillo-beat .8s var(--mx-ease) .1s; }
@keyframes mx-anillo-beat { 35% { transform: scale(1.04); } }
.mx-anillo.is-done .mx-anillo__echo { animation: mx-anillo-echo 1.2s cubic-bezier(.2, .7, .3, 1) .1s; }
@keyframes mx-anillo-echo { from { opacity: .9; transform: scale(.98); } to { opacity: 0; transform: scale(1.45); } }

/* leaving: fade and scale out, then anillo.js removes the node */
.mx-anillo.is-leaving { opacity: 0; transform: scale(1.06); pointer-events: none; }

@media (max-width: 480px) {
  .mx-anillo { gap: 22px; }
  .mx-anillo__label { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  .mx-anillo { transition: opacity .4s linear; }
  .mx-anillo__label::after { animation: none; content: "..."; }
  .mx-anillo__logo, .mx-anillo__count { transition: opacity .3s; }
  .mx-anillo.is-done .mx-anillo__logo { transform: none; }
  .mx-anillo.is-done .mx-anillo__count { transform: none; }
  .mx-anillo.is-done .mx-anillo__arrow { animation: none; }
  .mx-anillo.is-done .mx-anillo__canvas, .mx-anillo.is-done .mx-anillo__echo { animation: none; }
  .mx-anillo.is-leaving { transform: none; }
}
