/*
  ELVN V3 — Sign-in set-up (2026-11-12)

  The ELVN sign-in choice, first built for ELVNverse and adopted into V3 at
  Matthew's request. Use it on any ELVN sign-in or sign-up screen.

  1. "Continue with Google"   .g-button   Google's dark button style; Google's
                                           sign-in branding requires their G and
                                           this look (elvn-signin.js draws the G).
  2. "Continue with email"    .mail-button Same size, ELVN glass; reveals the
                                           email + password fields.
  3. divider                  .or-email    a short label between rules
  4. "Press and hold to sign up"  .hold    A charging ring runs round the edge
                                           and light fills from the left while
                                           held; releases early drain it; when
                                           full it flares and the sign-up
                                           fields materialise. Keyboard: hold
                                           Space or Enter.
  5. Fields materialise       .fields.materialize + .scan
                                           a light line scans down; each field
                                           resolves out of a blur, staggered.

  Needs the V3 tokens (tokens/elvn-tokens.css). Behaviour: elvn-signin.js
  (ElvnSignin.hold, ElvnSignin.googleMark). Reduced motion: no animation, the
  fields simply appear; the hold still works. Forced colours: system colours.
*/

/* 1. Google's own dark sign-in button style (their branding guidelines). */
.g-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: var(--elvn-field-height); padding: 0 16px; color: #e3e3e3; font: 500 15px/1 Roboto, var(--elvn-font-body); text-decoration: none; cursor: pointer; background: #131314; border: 1px solid #8e918f; border-radius: 4px; }
.g-button:hover { background: #1f1f20; }
.g-mark { width: 20px; height: 20px; flex: none; }
.g-status { margin: 0; }
.or-email { display: flex; align-items: center; gap: 12px; margin: 2px 0 0; color: var(--elvn-text-muted); font-size: var(--elvn-text-xs); letter-spacing: 0.06em; text-transform: uppercase; }
.or-email::before, .or-email::after { content: ""; flex: 1; border-top: 1px solid rgba(210, 232, 255, 0.14); }
/* Continue with email: same size as Google's button, in ELVN glass. */
.mail-button { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: var(--elvn-field-height); padding: 0 16px; font: 500 15px/1 var(--elvn-font-body); color: var(--elvn-text); cursor: pointer;
  background: rgba(210, 232, 255, 0.10); border: 1px solid rgba(210, 232, 255, 0.28); border-radius: 4px; box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.35); }
.mail-button:hover { border-color: var(--elvn-accent); }
.mail-button .ico { width: 20px; height: 20px; color: var(--elvn-accent); }
.back { margin-top: -4px; min-width: 64px; }

/* Press and hold to sign up. A charging ring runs round the edge while you
   hold, light fills the body from the left, and when the ring closes the
   button flares and the sign-up fields materialise. */
.hold {
  --hold: 0;
  position: relative; isolation: isolate; overflow: hidden;
  display: grid; place-items: center; min-height: 64px; padding: 0 20px;
  font: 600 13px/1 var(--elvn-font-body); letter-spacing: 0.22em; text-transform: uppercase; color: var(--elvn-text);
  background: rgba(8, 12, 20, 0.6); border: 0; border-radius: var(--elvn-radius-control); cursor: pointer;
  touch-action: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
  box-shadow: inset 0 0 0 1px rgba(var(--elvn-accent-rgb), 0.22), inset 0 1px 0 rgba(255, 255, 255, 0.3);
  transition: transform var(--elvn-duration-fast) var(--elvn-ease-standard);
}
.hold-ring { position: absolute; inset: 0; border-radius: inherit; padding: 2px; pointer-events: none;
  background: conic-gradient(from 0deg, var(--elvn-accent) calc(var(--hold) * 360deg), transparent calc(var(--hold) * 360deg));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.hold-fill { position: absolute; inset: 0; z-index: -1; pointer-events: none; transform-origin: left center; transform: scaleX(var(--hold));
  background: linear-gradient(90deg, rgba(var(--elvn-accent-rgb), 0.05), rgba(var(--elvn-accent-rgb), 0.28) 85%, rgba(255, 255, 255, 0.45) 100%); }
.hold::after { /* fine scan lines across the body: the "instrument" texture */
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none; opacity: 0.5;
  background: repeating-linear-gradient(90deg, transparent 0 7px, rgba(var(--elvn-accent-rgb), 0.10) 7px 8px); }
.hold.holding { transform: scale(0.985); }
.hold.hold-done { box-shadow: inset 0 0 0 1px var(--elvn-accent), 0 0 32px rgba(var(--elvn-accent-rgb), 0.45); }
.hold.hold-done .hold-fill { background: linear-gradient(90deg, rgba(var(--elvn-accent-rgb), 0.35), rgba(255, 255, 255, 0.55)); }
.hold-label { position: relative; }
.hold-help { margin: -6px 0 0; text-align: center; font-size: 13px; color: var(--elvn-text-muted); }

/* The fields materialise: a light line scans down the panel and each field
   resolves out of a blur, one after another. */
.fields { position: relative; display: grid; gap: 16px; }
.materialize > * { animation: materialize 520ms cubic-bezier(0.2, 0.8, 0.2, 1) both; }
.materialize > :nth-child(2) { animation-delay: 40ms; }
.materialize > :nth-child(3) { animation-delay: 110ms; }
.materialize > :nth-child(4) { animation-delay: 180ms; }
.materialize > :nth-child(5) { animation-delay: 250ms; }
.materialize > :nth-child(6) { animation-delay: 300ms; }
.materialize > :nth-child(7) { animation-delay: 340ms; }
.materialize > :nth-child(8) { animation-delay: 380ms; }
.materialize > .scan { position: absolute; z-index: 2; left: -6%; right: -6%; top: 0; height: 2px; pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(var(--elvn-accent-rgb), 0.9) 30%, #fff 50%, rgba(var(--elvn-accent-rgb), 0.9) 70%, transparent);
  box-shadow: 0 0 18px 3px rgba(var(--elvn-accent-rgb), 0.55);
  animation: scan 640ms var(--elvn-ease-standard) both; }
@keyframes materialize {
  from { opacity: 0; transform: translateY(10px) scaleY(0.96); filter: blur(8px); clip-path: inset(0 0 100% 0); }
  60% { opacity: 1; filter: blur(1px); }
  to { opacity: 1; transform: none; filter: none; clip-path: inset(0 0 0 0); }
}
@keyframes scan { from { top: 0; opacity: 1; } 85% { opacity: 1; } to { top: 100%; opacity: 0; } }

@media (prefers-reduced-motion: reduce) {
  .materialize > *, .materialize > .scan { animation: none; }
  .materialize > .scan { display: none; }
  .hold { transition: none; }
}
@media (forced-colors: active) {
  .hold { border: 1px solid ButtonText; }
  .hold-ring { background: conic-gradient(Highlight calc(var(--hold) * 360deg), transparent 0); }
  .mail-button { border-color: ButtonText; }
}
