/* Magic UI effects, ported to plain CSS. Everything here only applies while <html> has .mu,
   and nothing moves for visitors who prefer reduced motion. */

/* ---------- Border Beam: a light that travels round the hero's website frame ---------- */
.mu-beam { display: none; }
.mu .mu-beam {
  display: block; position: absolute; inset: 0; z-index: 2; pointer-events: none;
  border-radius: inherit; border: 2px solid transparent;
  -webkit-mask: linear-gradient(#000 0 0) padding-box, linear-gradient(#000 0 0) border-box;
  -webkit-mask-composite: xor;
  mask: linear-gradient(#000 0 0) padding-box exclude, linear-gradient(#000 0 0) border-box;
}
.mu .mu-beam::before {
  content: ''; position: absolute; width: 160px; aspect-ratio: 1;
  background: linear-gradient(to left, var(--amber), var(--tomato), transparent);
  offset-path: rect(0 auto auto 0 round 160px);
  animation: mu-beam 9s linear infinite;
}
@keyframes mu-beam { from { offset-distance: 0%; } to { offset-distance: 100%; } }

/* ---------- Shiny Button: a soft sheen crosses the main call to action now and then ---------- */
.mu .mu-shiny { position: relative; overflow: hidden; isolation: isolate; }
.mu .mu-shiny::after {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: linear-gradient(-75deg, transparent 35%, rgba(255, 255, 255, 0.55) 50%, transparent 65%);
  transform: translateX(-120%);
  animation: mu-shine 5s var(--ease-soft) 1.6s infinite;
}
@keyframes mu-shine { 0% { transform: translateX(-120%); } 30%, 100% { transform: translateX(120%); } }

/* ---------- Magic Card: a spotlight follows the pointer across the price panels ---------- */
.mu .mu-card { position: relative; isolation: isolate; }
.mu .mu-card::before {
  content: ''; position: absolute; inset: 0; z-index: -1; pointer-events: none; border-radius: inherit;
  background: radial-gradient(260px circle at var(--mx, 50%) var(--my, 50%), var(--mu-glow, rgba(255, 255, 255, 0.22)), transparent 70%);
  opacity: 0; transition: opacity 300ms ease;
}
.mu .mu-card.is-lit::before { opacity: 1; }
.mu .price-inc.mu-card, .mu .price-extra.mu-card { --mu-glow: rgba(255, 255, 255, 0.5); }

/* ---------- Lens: a magnifier over the work screenshots, so you can read the detail ---------- */
.mu-lens, .mu-lens-ring { display: none; }
@media (hover: hover) and (pointer: fine) {
  .mu .shot { position: relative; cursor: zoom-in; }
  .mu .mu-lens {
    display: block; position: absolute; inset: 0; z-index: 3; pointer-events: none; overflow: hidden;
    -webkit-mask-image: radial-gradient(circle 95px at var(--lx, 50%) var(--ly, 50%), #000 98%, transparent 100%);
    mask-image: radial-gradient(circle 95px at var(--lx, 50%) var(--ly, 50%), #000 98%, transparent 100%);
    opacity: 0; transform: scale(0.85); transform-origin: var(--lx, 50%) var(--ly, 50%);
    transition: opacity 160ms ease, transform 220ms var(--ease-out);
  }
  .mu .shot.is-lens .mu-lens { opacity: 1; transform: scale(1); }
  .mu .mu-lens img { width: 100%; height: 100%; object-fit: cover; object-position: top; transform: scale(1.9); transform-origin: var(--lx, 50%) var(--ly, 50%); }
  .mu .shot.is-lens > img { transform: none; }
  .mu .mu-lens-ring {
    display: block; position: absolute; z-index: 4; pointer-events: none; width: 190px; height: 190px; margin: -95px 0 0 -95px;
    left: var(--lx, 50%); top: var(--ly, 50%); border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.9), 0 12px 30px rgba(0, 0, 0, 0.28);
    opacity: 0; transform: scale(0.85); transition: opacity 160ms ease, transform 220ms var(--ease-out);
  }
  .mu .shot.is-lens .mu-lens-ring { opacity: 1; transform: scale(1); }
}

/* ---------- Aurora Text: "Reel" in a slowly moving amber-to-tomato light (after the intro) ---------- */
.mu-aurora-on .hero-b {
  background-image: linear-gradient(120deg, var(--amber), #F3C46B, var(--tomato), #F08A5D, var(--amber));
  background-size: 250% auto; -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: mu-aurora 9s ease-in-out infinite alternate;
}
@keyframes mu-aurora { from { background-position: 0% 50%; } to { background-position: 100% 50%; } }

/* the rotating slogan replaces the plain one only while the test layer is on */
.mu-on-only { display: none; }
.mu .mu-on-only { display: inline; }
.mu .mu-off-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Word Rotate: who the site is for, in the slogan ---------- */
.mu-rotate { display: inline-block; position: relative; overflow: hidden; vertical-align: bottom; height: 1.15em; transition: width 380ms var(--ease-out); color: var(--amber); }
.mu-rotate span { display: block; white-space: nowrap; transition: transform 420ms var(--ease-out), opacity 300ms ease; }
.mu-rotate span.is-out { transform: translateY(-110%); opacity: 0; }
.mu-rotate span.is-in { transform: translateY(110%); opacity: 0; }

/* ---------- Text Reveal: the words light up as you scroll past ---------- */
.mu-reveal-word { opacity: 0.18; transition: opacity 120ms linear; }
.mu-reveal { font-size: var(--step-lead); line-height: 1.3; max-width: 34ch; }

/* ---------- Scroll Progress ---------- */
.mu-progress { position: fixed; inset: 0 0 auto 0; z-index: 60; height: 4px; transform-origin: left; transform: scaleX(0); pointer-events: none;
  background: linear-gradient(90deg, var(--amber), var(--tomato)); }

@media (prefers-reduced-motion: reduce) {
  .mu .mu-beam::before, .mu .mu-shiny::after, .mu-aurora-on .hero-b { animation: none; }
  .mu .mu-beam { display: none; }
  .mu-reveal-word { opacity: 1; }
}
