/* Block: dot-field
 *
 * The opener intro. Figma: 84.29px violet circles on the 1920 artboard, which
 * is 4.39vw. They scatter, then travel into the dot on the end of the lockup.
 *
 * The whole per-dot sequence is driven from scripts/tgc-dots.js through the
 * Web Animations API, so there are no keyframes here to hand over to a
 * transition part-way through. That handoff used to snap: dropping the
 * animation reverted each dot to the rule underneath before the transition
 * picked it up.
 */
.dot-field {
    position: absolute;
    inset: 0;
    overflow: visible;
    pointer-events: none;
    z-index: 0;
}

.dot-field__dot {
    position: absolute;
    width: var(--dot-size);
    height: var(--dot-size);
    border-radius: 50%;
    background-color: var(--tgc-violet);
    /* Held until the script's timeline takes over, so nothing flashes on load. */
    opacity: 0;
    will-change: transform, opacity;
}

/* The gathered dot is placed in px against the lockup, not by percentage. */
.dot-field__dot--one {
    opacity: 1;
}

/* Merged into the lockup: nothing left to draw. */
.dot-field--done {
    display: none;
}

/*
 * The opener arrives in two beats. The lockup comes up first — it is the thing
 * the dots are aiming at, and holding it back meant they converged on an
 * invisible target and the logo appeared afterwards. The copy then follows the
 * dots home. Both are gated on .js so that without JavaScript the hero is
 * simply visible.
 */
.js .hero-intro .wordmark {
    opacity: 0;
}

/* The lockup is uncovered by the travelling dot (a clip-path animation), so
   it appears without a fade of its own. */
.js .hero-intro.is-lockup .wordmark {
    opacity: 1;
}

/* While it travels, the moving dot stands in for the lockup's own. */
.hero-intro.is-drawing .wordmark__dot {
    opacity: 0;
}

.js .hero-intro__title {
    opacity: 0;
    transform: translateY(calc(14 * var(--tgc-u)));
}

.js .hero-intro.is-revealed .hero-intro__title {
    opacity: 1;
    transform: none;
    transition: opacity 0.6s ease, transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}

@media (prefers-reduced-motion: reduce) {
    .dot-field__dot {
        opacity: 1;
        will-change: auto;
    }

    .js .hero-intro .wordmark,
    .js .hero-intro__title {
        opacity: 1;
        transform: none;
    }

    .js .hero-intro.is-lockup .wordmark,
    .js .hero-intro.is-revealed .hero-intro__title {
        transition: none;
    }
}
