/* client-signin-v3-1-plus (Nov 18, 2026): the sign-in page's left-side glow (v2/signin-fx.js).
   client-signin-v3-1-plus-pulse (Nov 18, 2026): the pointer ripples are gone; one digital pulse as the intro resolves.
   client-signin-pulse-scan-tune (Nov 18, 2026): Shinwoo picked scan; the dots variant is gone. The ring now starts at
   the aperture brackets' edges (scale set inline from their real boxes) and leaves them at their own speed.
   Both layers sit in the page backdrop (z-index -1, right after V3's bloom), under the card and every word, with
   pointer-events: none on everything and aria-hidden in the markup. Only transform and opacity ever animate. The colour
   is the page's scoped --signin-accent (#55A882). Faint by design. */
.v31p-fx, .v31p-fx *, .v31p-pulse, .v31p-pulse * { pointer-events: none !important; }
.v31p-fx { position: absolute; inset: 0; z-index: -1; overflow: hidden; contain: strict; }
.v31p-left { position: absolute; top: 0; left: 0; bottom: 0; }

/* The glow lives in a box as wide as the ink side; its right edge is masked soft so the light never ends in a line. */
.v31p-left {
  width: var(--v31p-edge, 100%);
  overflow: hidden;
  -webkit-mask-image: linear-gradient(to right, #000 calc(100% - 140px), transparent);
  mask-image: linear-gradient(to right, #000 calc(100% - 140px), transparent);
}
.v31p-glow {
  position: absolute; left: -320px; top: -320px; width: 640px; height: 640px; border-radius: 50%;
  background: radial-gradient(closest-side,
    rgba(85, 168, 130, .15), rgba(85, 168, 130, .06) 48%, transparent 72%);
  background: radial-gradient(closest-side,
    color-mix(in srgb, var(--signin-accent) 15%, transparent),
    color-mix(in srgb, var(--signin-accent) 6%, transparent) 48%, transparent 72%);
  opacity: 0;
  will-change: transform, opacity;
}

/* ---------- ambient glow (no fine pointer: phones, tablets) ----------
   The glow drifts very slowly around the brand block. Its top offset is in px, not %: the page grows a little when
   the web fonts land, and a % offset would move the glow with it and count as a layout shift (CLS). */
.v31p-ambient .v31p-glow {
  left: 8%; top: 34px; margin: -260px 0 0 -260px; width: 520px; height: 520px; opacity: .8;
  animation: v31p-drift 28s ease-in-out infinite alternate;
}
@keyframes v31p-drift {
  0% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(18vw, 6vh, 0); }
  100% { transform: translate3d(6vw, 14vh, 0); }
}

/* Tab hidden: freeze the CSS loop (the JS side stops its frames itself). */
.v31p-paused .v31p-glow { animation-play-state: paused; }

/* ---------- the scan pulse (one per intro, removed when it ends) ----------
   Every box has a fixed size set once at build time (left, top, width, height inline); nothing is resized while it
   runs. The ring is one circle as big as the whole wave, centred between the brackets. Its start scale (inline
   transform) puts its edge on the bracket edges at hand-off; it scales to 1 (transform) on an easing whose start slope
   matches the brackets' speed, and fades in over its first frames (opacity, its own linear animation), so there is no
   jump in place or brightness. Each grid cell is a small fixed box that fades in and out (opacity) on its own delay,
   timed so it peaks as the front reaches it. The scanlines line up across cells (each cell is a whole number of
   pitches). */
.v31p-pulse { position: absolute; inset: 0; z-index: -1; overflow: hidden; contain: strict; }
.v31p-pulse > span { position: absolute; display: block; opacity: 0; animation-fill-mode: both; }
.v31p-ring {
  border-radius: 50%;
  animation-name: v31p-ring, v31p-ring-fade;
  will-change: transform, opacity;
  /* a sharp leading edge, nothing inside */
  background: radial-gradient(closest-side, transparent 96%,
    rgba(85, 168, 130, .4) 99.4%, transparent 100%);
  background: radial-gradient(closest-side, transparent 96%,
    color-mix(in srgb, var(--signin-accent) 40%, transparent) 99.4%, transparent 100%);
}
/* transform only: from the inline start scale to the full ring */
@keyframes v31p-ring { to { transform: scale(1); } }
/* opacity only, linear: rises from 0 at the bracket edges, holds, then thins out */
@keyframes v31p-ring-fade { 0% { opacity: 0; } 9% { opacity: 1; } 55% { opacity: .7; } 100% { opacity: 0; } }

/* blocks of fine scanlines that flick on as the front passes */
.v31p-cell {
  background:
    repeating-linear-gradient(to bottom, rgba(85, 168, 130, .22) 0 1px, transparent 1px 4px),
    rgba(85, 168, 130, .035);
  background:
    repeating-linear-gradient(to bottom, color-mix(in srgb, var(--signin-accent) 22%, transparent) 0 1px, transparent 1px 4px),
    color-mix(in srgb, var(--signin-accent) 3.5%, transparent);
  /* a hairline gap between blocks, so the wavefront reads as pixels (static, never animated) */
  box-sizing: border-box; border: 1px solid transparent; background-clip: padding-box;
  animation: v31p-scan-1 320ms linear both;
}

/* far cells are fainter, so the wave thins out as it spreads */
.v31p-t2 { animation-name: v31p-scan-2; }
.v31p-t3 { animation-name: v31p-scan-3; }
/* a quick digital flicker on the way in, then a clean fade */
@keyframes v31p-scan-1 { 0% { opacity: 0; } 8% { opacity: .9; } 14% { opacity: .35; } 20% { opacity: .9; } 100% { opacity: 0; } }
@keyframes v31p-scan-2 { 0% { opacity: 0; } 8% { opacity: .65; } 14% { opacity: .25; } 20% { opacity: .65; } 100% { opacity: 0; } }
@keyframes v31p-scan-3 { 0% { opacity: 0; } 8% { opacity: .42; } 14% { opacity: .16; } 20% { opacity: .42; } 100% { opacity: 0; } }

/* phones and narrow windows: gentler (and the JS uses bigger, fewer cells) */
.v31p-pulse-lite { opacity: .62; }

/* Reduced motion: nothing at all (the JS never builds either layer then; this is the belt to that brace). */
@media (prefers-reduced-motion: reduce) {
  .v31p-fx, .v31p-pulse { display: none !important; }
}
