/* The intro of www.moonwave.kr. brand/intro-v4.js decides in <head> whether it plays and marks <html>:
     html.mw-intro.mw-intro-full   the first visit on a device (or /?intro), about five seconds, one thing at a time so each
                                   can be seen: the Moonwave mark draws itself, its red dot swings into place, three waves run
                                   out through a field of dust, the name and its line come up and stay a moment, then the ring
                                   opens like an iris onto the page, where the sculpture turns in (hero-v5.js).
     html.mw-intro                 every later visit: only the first screen comes into focus.
   Nothing plays when the device asks for less motion (Moonwave UX a11y#motion: every animation is inside
   prefers-reduced-motion: no-preference), and every animation ends where the page already stands, so taking the classes
   off (the script does, at the end) changes nothing on screen. The timings live here only; the script reads them.
   Lengths and curves are the kit's motion tokens (foundations/motion): 300ms for one element, the 1000ms one for the veil
   and what moves across the whole screen with it; --mw-ease for what arrives, --mw-ease-pop for the red dot. Only the
   moments things start (the delays) are the page's own, so the pace is set by when each beat starts, not by slower
   movement. The name is a drawing (eight letters of Pretendard Bold as outlines, kerned and tracked like the page's
   headings), so it can be larger than the type scale's 60px. A line at the foot says how to skip. */
:root{
  --www-intro-ease:var(--mw-ease);--www-intro-swing:var(--mw-ease-pop);--www-intro-sweep:var(--motion-easing-ease-in-out);
  --www-intro-draw:var(--motion-duration-loop);--www-intro-dot:var(--motion-duration-loop);--www-intro-dot-at:800ms;
  --www-intro-ripple:var(--motion-duration-loop);--www-intro-ripple-at:1400ms;--www-intro-ripple-gap:360ms;--www-intro-ripple-scale:7;
  --www-intro-word:var(--motion-duration-long);--www-intro-word-at:1800ms;--www-intro-letter:60ms;--www-intro-hint-at:1000ms;
  --www-intro-out:var(--motion-duration-loop);--www-intro-exit:4000ms;--www-intro-reveal:.3;
  --www-intro-in:var(--motion-duration-long);--www-intro-step:70ms;--www-intro-settle:1600ms;
  --www-intro-blur:14px;--www-intro-lift:18px;--www-intro-spread:24%;--www-intro-cy:42%;
  --www-intro-ring:clamp(5.5rem,15vmin,8rem);--www-intro-word-h:clamp(2.5rem,8vw,5.4rem);
  --www-intro-stroke:12;--www-intro-open:30;
  --www-intro-z:100;--www-intro-base:0ms
}
/* the second line of the title moves on its own (a transform needs a box); one line, so nothing else changes */
.hero h1 span{display:inline-block}
.www-intro{display:none}

@media (prefers-reduced-motion:no-preference){
  /* the first screen starts to come into focus once the iris is under way */
  html.mw-intro-full{--www-intro-base:calc(var(--www-intro-exit) + var(--www-intro-out) * var(--www-intro-reveal))}
  html.mw-intro-skip{--www-intro-base:0ms}

  /* ── the veil: graphite over everything until the iris opens. It never takes the pointer: the page under it is live
     from the start, and the script turns the first tap into a skip (and keeps that tap from reaching the page). It hides
     itself when its last animation ends, so it cannot stay in the way even if the script stops. ── */
  html.mw-intro-full .www-intro{
    display:block;position:fixed;inset:0;z-index:var(--www-intro-z);overflow:hidden;visibility:hidden;pointer-events:none;
    background:var(--mw-graphite);color:var(--mw-pearl);
    -webkit-mask-image:radial-gradient(circle at 50% var(--www-intro-cy),transparent var(--www-intro-hole),var(--mw-graphite) calc(var(--www-intro-hole) + var(--border-width-1)));
    mask-image:radial-gradient(circle at 50% var(--www-intro-cy),transparent var(--www-intro-hole),var(--mw-graphite) calc(var(--www-intro-hole) + var(--border-width-1)));
    animation:www-intro-hold var(--www-intro-out) var(--motion-easing-linear) var(--www-intro-exit) both,
      www-intro-iris var(--www-intro-out) var(--www-intro-sweep) var(--www-intro-exit) both
  }
  html.mw-intro-skip .www-intro{animation:www-intro-gone var(--motion-duration-long) var(--motion-easing-linear) both,www-intro-fade var(--motion-duration-long) var(--motion-easing-ease-out) both}
  .www-intro-field{position:absolute;inset:0;width:100%;height:100%}

  /* ── the mark: ring, red dot, waves ── */
  .www-intro-core{position:absolute;left:50%;top:var(--www-intro-cy);width:var(--www-intro-ring);aspect-ratio:1;transform:translate(-50%,-50%)}
  .www-intro-glow{position:absolute;inset:-160%;border-radius:var(--radius-circle);background:radial-gradient(circle,color-mix(in srgb,var(--mw-signal) 16%,transparent),color-mix(in srgb,var(--mw-pearl) 4%,transparent) 32%,transparent 62%);opacity:0;
    animation:www-intro-glow var(--www-intro-dot) var(--motion-easing-ease-out) var(--www-intro-dot-at) both}
  .www-intro-wave{position:absolute;inset:0;border-radius:var(--radius-circle);border:var(--border-width-1) solid color-mix(in srgb,var(--mw-pearl) 70%,transparent);opacity:0;
    animation:www-intro-wave var(--www-intro-ripple) var(--motion-easing-linear) var(--www-intro-ripple-at) both}
  .www-intro-wave:nth-of-type(3){animation-delay:calc(var(--www-intro-ripple-at) + var(--www-intro-ripple-gap))}
  .www-intro-wave:nth-of-type(4){animation-delay:calc(var(--www-intro-ripple-at) + var(--www-intro-ripple-gap) * 2)}
  .www-intro-ring{position:absolute;inset:0;width:100%;height:100%;overflow:visible}
  /* the stroke is a share of the mark (viewBox units); while the ring opens it is divided by the scale, so the edge of
     the iris keeps the mark's weight all the way out */
  .www-intro-ring circle{fill:none;stroke:var(--mw-pearl);stroke-width:calc(var(--www-intro-stroke) / var(--www-intro-s));stroke-linecap:round;
    stroke-dasharray:1;stroke-dashoffset:1;transform-box:view-box;transform-origin:50% 50%;transform:rotate(-53deg) scale(var(--www-intro-s));
    animation:www-intro-draw var(--www-intro-draw) var(--www-intro-ease) both,www-intro-open var(--www-intro-out) var(--www-intro-sweep) var(--www-intro-exit) both}
  .www-intro-orbit{position:absolute;inset:0;animation:www-intro-swing var(--www-intro-dot) var(--www-intro-swing) var(--www-intro-dot-at) both}
  /* where the dot stands in the mark (brand/icon-original.svg): up and to the right of the ring; it glows from behind */
  .www-intro-dot{position:absolute;left:86%;top:-27%;width:26%;aspect-ratio:1;border-radius:var(--radius-circle);
    background:radial-gradient(circle at 30% 25%,var(--red-400),var(--mw-signal) 50%,var(--red-800))}
  .www-intro-dot::after{content:'';position:absolute;inset:-70%;z-index:-1;border-radius:var(--radius-circle);background:radial-gradient(circle,color-mix(in srgb,var(--mw-signal) 45%,transparent),transparent 68%)}

  /* ── the name ── */
  .www-intro-kicker{position:absolute;left:0;right:0;bottom:calc(100% - var(--www-intro-cy) + var(--www-intro-ring) + var(--space-16));display:flex;justify-content:center;align-items:center;gap:var(--space-12);
    margin:0;font-size:var(--font-size-12);font-weight:var(--font-weight-semibold);letter-spacing:var(--www-tracking-caps);text-transform:uppercase;color:var(--text-tertiary);
    animation:www-intro-rise var(--www-intro-word) var(--www-intro-ease) var(--www-intro-word-at) both,www-intro-leave var(--motion-duration-medium) var(--motion-easing-ease-in) var(--www-intro-exit) forwards}
  .www-intro-mark{position:absolute;left:0;right:0;top:calc(var(--www-intro-cy) + var(--www-intro-ring) / 2 + var(--space-40));text-align:center;
    animation:www-intro-leave var(--motion-duration-medium) var(--motion-easing-ease-in) var(--www-intro-exit) both}
  /* each letter comes in from where it would stand in a wider name (--www-intro-x: its place from the middle) */
  .www-intro-word{display:flex;justify-content:center;margin:0}
  .www-intro-word svg{flex:none;height:var(--www-intro-word-h);width:auto;overflow:visible;fill:currentColor;
    animation:www-intro-letter var(--www-intro-word) var(--www-intro-ease) var(--www-intro-word-at) both}
  .www-intro-word svg:nth-child(1){--www-intro-x:-3.5}
  .www-intro-word svg:nth-child(2){--www-intro-x:-2.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter))}
  .www-intro-word svg:nth-child(3){--www-intro-x:-1.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 2)}
  .www-intro-word svg:nth-child(4){--www-intro-x:-.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 3)}
  .www-intro-word svg:nth-child(5){--www-intro-x:.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 4)}
  .www-intro-word svg:nth-child(6){--www-intro-x:1.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 5)}
  .www-intro-word svg:nth-child(7){--www-intro-x:2.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 6)}
  .www-intro-word svg:nth-child(8){--www-intro-x:3.5;animation-delay:calc(var(--www-intro-word-at) + var(--www-intro-letter) * 7)}
  .www-intro-line{margin:var(--space-24) 0 0;font-size:var(--font-size-15);color:var(--text-secondary);
    animation:www-intro-rise var(--www-intro-word) var(--www-intro-ease) calc(var(--www-intro-word-at) + var(--www-intro-letter) * 8) both}
  /* how to skip, quiet at the foot of the screen: any tap, click or key does it (intro-v4.js) */
  .www-intro-hint{position:absolute;left:0;right:0;bottom:calc(var(--space-24) + env(safe-area-inset-bottom));margin:0;text-align:center;
    font-size:var(--font-size-12);color:var(--text-tertiary);
    animation:www-intro-rise var(--www-intro-word) var(--www-intro-ease) var(--www-intro-hint-at) both,www-intro-leave var(--motion-duration-medium) var(--motion-easing-ease-in) var(--www-intro-exit) forwards}

  /* ── the first screen comes into focus (both kinds of visit; after the iris on the first). Only blur and a lift: the
     text keeps its full colour throughout, and nothing is clipped, so every link can be pressed at any moment. ── */
  html.mw-intro .hero-art{animation:www-intro-art var(--motion-duration-loop) var(--www-intro-ease) var(--www-intro-base) both}
  html.mw-intro :is(.hero-byline,.hero h1,.hero h1 span,.hero-topline,.hero-statement,.hero-actions,.top,.art-caption,.scene-controls,.hero-foot>a){animation:www-intro-focus var(--www-intro-in) var(--www-intro-ease) var(--www-intro-base) both}
  html.mw-intro .hero-byline{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step))}
  html.mw-intro .hero h1{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 2)}
  html.mw-intro .hero h1 span{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 3)}
  html.mw-intro .hero-topline{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 3)}
  html.mw-intro .hero-statement{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 4)}
  html.mw-intro .hero-actions{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 5)}
  html.mw-intro .top{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 5)}
  html.mw-intro .hero-foot>a:nth-child(1){animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 6)}
  html.mw-intro .hero-foot>a:nth-child(2){animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 7)}
  html.mw-intro .hero-foot>a:nth-child(3){animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 8)}
  html.mw-intro .art-caption{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 7)}
  html.mw-intro .scene-controls{animation-delay:calc(var(--www-intro-base) + var(--www-intro-step) * 8)}
}
@media (prefers-reduced-motion:no-preference) and (max-height:480px){
  .www-intro-kicker,.www-intro-line,.www-intro-hint{display:none}
}

@property --www-intro-hole{syntax:'<length>';inherits:false;initial-value:0px}
@property --www-intro-s{syntax:'<number>';inherits:false;initial-value:1}
@keyframes www-intro-hold{from{visibility:visible}to{visibility:hidden}}
@keyframes www-intro-gone{from{visibility:visible}to{visibility:hidden}}
@keyframes www-intro-fade{to{opacity:0}}
/* the hole grows from nothing to past the corners; the ring's inner edge runs ahead of it */
@keyframes www-intro-iris{from{--www-intro-hole:0px}70%{opacity:1}to{--www-intro-hole:calc(var(--www-intro-ring) * var(--www-intro-open) * .44);opacity:0}}
@keyframes www-intro-draw{to{stroke-dashoffset:0}}
@keyframes www-intro-open{70%{opacity:1}to{--www-intro-s:var(--www-intro-open);opacity:0}}
@keyframes www-intro-swing{from{transform:rotate(-200deg);opacity:0}25%{opacity:1}to{transform:none;opacity:1}}
@keyframes www-intro-glow{from{opacity:0;transform:scale(.6)}40%{opacity:1}to{opacity:.7;transform:none}}
@keyframes www-intro-wave{from{opacity:0;transform:none}6%{opacity:.85}to{opacity:0;transform:scale(var(--www-intro-ripple-scale))}}
@keyframes www-intro-letter{from{opacity:0;filter:blur(var(--www-intro-blur));transform:translate(calc(var(--www-intro-x) * var(--www-intro-spread)),var(--www-intro-lift)) scale(1.12)}}
@keyframes www-intro-rise{from{opacity:0;filter:blur(var(--www-intro-blur));transform:translateY(var(--www-intro-lift))}}
@keyframes www-intro-leave{to{opacity:0;filter:blur(var(--www-intro-blur));transform:scale(1.08)}}
@keyframes www-intro-focus{from{filter:blur(var(--www-intro-blur));transform:translateY(var(--www-intro-lift))}}
@keyframes www-intro-art{from{opacity:0;filter:blur(calc(var(--www-intro-blur) * 2));transform:scale(.84) rotate(-6deg)}}
