/* BIDLAYER_INTRO_V2: Pearl Glass Signature. Decorative and fail-open. */
.bl-intro {
  --bl-intro-ready: 1;
  position: fixed;
  inset: 0;
  z-index: 2147483000;
  display: grid;
  place-items: center;
  overflow: hidden;
  contain: layout paint;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  /* Quiet, readable fallback: no backdrop-filter support is required. */
  background: rgba(247, 250, 251, .92);
  color: #17283c;
  font-family: Inter, system-ui, -apple-system, Arial, sans-serif;
}
.bl-intro[hidden] { display: none !important; }
.bl-intro.bl-intro--playing {
  animation: bl-intro-lifetime 1260ms linear both;
}
@supports ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .bl-intro {
    background: rgba(247, 250, 251, .80);
    -webkit-backdrop-filter: blur(8px);
    backdrop-filter: blur(8px);
  }
}
.bl-intro__atmosphere {
  position: absolute;
  inset: -6%;
  background:
    radial-gradient(ellipse at 32% 47%, #86dfd736, transparent 43%),
    radial-gradient(ellipse at 70% 53%, #b3a2e62a, transparent 43%),
    radial-gradient(ellipse at 53% 44%, #ffffffba 5%, #ffffff00 62%);
  animation: bl-intro-atmosphere 1260ms ease-out both;
}
.bl-intro__wave {
  position: absolute;
  width: min(1100px, 140vw);
  height: clamp(150px, 24vw, 260px);
  left: 50%;
  top: 50%;
  border-radius: 50%;
  border: 1px solid #91cbd52a;
  background: linear-gradient(165deg, #ffffff00 32%, #a0e2da1b 58%, #beb7ed1a 73%, #ffffff00);
  box-shadow: 0 -10px 28px #ffffff66, inset 0 -1px #ffffffb0;
  animation: bl-intro-wave 1260ms cubic-bezier(.2,.55,.35,1) both;
}
.bl-intro__wave--second {
  margin-top: 22px;
  border-color: #a9a1d71c;
  animation-delay: 60ms;
}
.bl-intro__wave--third {
  width: min(1240px, 155vw);
  height: clamp(170px, 26vw, 290px);
  margin-top: -17px;
  border-color: #ffffff70;
  background: transparent;
  box-shadow: inset 0 1px #b9d9df20;
  animation-delay: 110ms;
}
.bl-intro__signature {
  position: relative;
  display: flex;
  align-items: center;
  flex-direction: column;
  width: min(340px, 100%);
  padding: 24px;
  box-sizing: border-box;
  animation: bl-intro-release 1260ms cubic-bezier(.2,.7,.2,1) both;
}
.bl-intro__symbol {
  position: relative;
  width: 128px;
  height: 128px;
  flex: none;
  filter: drop-shadow(0 11px 13px #4443a522);
}
/* An asymmetric pearl lens: static refraction, no rotating ring/spinner. */
.bl-intro__symbol::before {
  content: "";
  position: absolute;
  inset: 12% -20% 10%;
  border-radius: 47% 53% 56% 44%;
  border: 1px solid #ffffffa3;
  border-left-color: transparent;
  border-bottom-color: #a6c8d32e;
  background: radial-gradient(ellipse at 43% 37%, #ffffff59, #d9eef51a 58%, #ffffff00 76%);
  box-shadow: inset 0 1px #ffffff80, 0 6px 17px #718ba00b;
  animation: bl-intro-lens 260ms ease-out 700ms both;
}
.bl-intro__ribbon {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  animation: bl-intro-ribbon 515ms cubic-bezier(.16,1,.3,1) both,
    bl-intro-retire 1260ms linear both;
}
/* The three masks partition the original bitmap; no replacement logo geometry. */
.bl-intro__ribbon--supply {
  --bl-intro-x: -16px;
  --bl-intro-y: -12px;
  clip-path: polygon(0 0,100% 0,100% 52%,73% 52%,28% 36%,0 36%);
  animation-delay: 50ms, 0ms;
}
.bl-intro__ribbon--routing {
  --bl-intro-x: 13px;
  --bl-intro-y: 2px;
  clip-path: polygon(0 36%,28% 36%,73% 52%,28% 65%,0 65%);
  animation-delay: 160ms, 0ms;
}
.bl-intro__ribbon--demand {
  --bl-intro-x: -10px;
  --bl-intro-y: 14px;
  clip-path: polygon(0 65%,28% 65%,73% 52%,100% 52%,100% 100%,0 100%);
  animation-delay: 250ms, 0ms;
}
/* The intact asset takes over after assembly, eliminating mask-edge seams. */
.bl-intro__complete {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  animation: bl-intro-complete 1260ms linear both;
}
/* Optional, single light pass, clipped to the exact existing PNG silhouette. */
.bl-intro__sweep { display: none; }
@supports ((mask-image: url("/bidlayer-symbol.png")) or (-webkit-mask-image: url("/bidlayer-symbol.png"))) {
  .bl-intro__sweep {
    display: block;
    position: absolute;
    inset: 0;
    overflow: hidden;
    -webkit-mask: url("/bidlayer-symbol.png") center / contain no-repeat;
    mask: url("/bidlayer-symbol.png") center / contain no-repeat;
  }
  .bl-intro__sweep::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    left: -70%;
    width: 60%;
    background: linear-gradient(108deg, #ffffff00 24%, #ffffff40 43%, #ffffffd9 50%, #ffffff30 58%, #ffffff00 75%);
    animation: bl-intro-polish 240ms cubic-bezier(.3,0,.35,1) 800ms both;
  }
}
.bl-intro__wordmark {
  margin-top: -2px;
  font-size: 34px;
  line-height: 1.2;
  font-weight: 800;
  letter-spacing: -1.25px;
  white-space: nowrap;
  animation: bl-intro-wordmark 240ms cubic-bezier(.16,1,.3,1) 780ms both;
}
.bl-intro__wordmark span { color: #6f67d8; }
.bl-intro__flow {
  display: flex;
  align-items: center;
  gap: 11px;
  margin-top: 19px;
  color: #617487;
  font-size: 9px;
  line-height: 16px;
  font-weight: 600;
  letter-spacing: 1.7px;
  text-transform: uppercase;
}
.bl-intro__flow span { animation: bl-intro-label 260ms ease-out 320ms both; }
.bl-intro__flow span:nth-of-type(2) { animation-delay: 410ms; }
.bl-intro__flow span:nth-of-type(3) { animation-delay: 500ms; }
.bl-intro__flow i { width: 14px; height: 1px; background: #87c9c5; }
.bl-intro-brand-enter { animation: bl-intro-brand-enter 420ms ease-out both; }
@keyframes bl-intro-lifetime {
  0% { opacity: 0; visibility: visible; }
  10%, 82% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}
@keyframes bl-intro-atmosphere {
  from { opacity: .15; transform: translate(-8px,4px) scale(1.025); }
  to { opacity: 1; transform: translate(6px,-4px) scale(1); }
}
@keyframes bl-intro-wave {
  from { opacity: 0; transform: translate(-51%,-42%) rotate(-10deg); }
  to { opacity: .9; transform: translate(-50%,-46%) rotate(-9deg); }
}
@keyframes bl-intro-ribbon {
  from { opacity: 0; transform: translate(var(--bl-intro-x),var(--bl-intro-y)); }
  to { opacity: 1; transform: translate(0,0); }
}
@keyframes bl-intro-complete { 0%, 60% { opacity: 0; } 62%, 100% { opacity: 1; } }
@keyframes bl-intro-retire { 0%, 61.99% { visibility: visible; } 62%, 100% { visibility: hidden; } }
@keyframes bl-intro-lens {
  from { opacity: 0; transform: translateY(3px) rotate(-14deg) scale(.97); }
  to { opacity: .7; transform: translateY(0) rotate(-14deg) scale(1); }
}
@keyframes bl-intro-polish {
  0% { opacity: 0; transform: translateX(0); }
  20% { opacity: .42; }
  75% { opacity: .35; }
  100% { opacity: 0; transform: translateX(300%); }
}
@keyframes bl-intro-wordmark {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes bl-intro-label { from { opacity: 0; } to { opacity: 1; } }
@keyframes bl-intro-release { 0%, 82% { transform: translateY(0); } 100% { transform: translateY(-2px); } }
@keyframes bl-intro-brand-enter {
  from { opacity: .65; transform: translateY(3px); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 480px) {
  .bl-intro { -webkit-backdrop-filter: blur(5px); backdrop-filter: blur(5px); }
  .bl-intro__symbol { width: 116px; height: 116px; }
  .bl-intro__wordmark { font-size: 31px; }
  .bl-intro__flow { font-size: 8px; gap: 9px; letter-spacing: 1.45px; }
}
@media (prefers-reduced-motion: reduce) {
  .bl-intro, .bl-intro.bl-intro--playing { display: none !important; animation: none !important; }
  .bl-intro-brand-enter { animation: none !important; }
}
@media print { .bl-intro { display: none !important; } }

/* AUTH_INTRO_V5: prevent login/signup content flashing before signature. */
body.public-auth.auth-entry:has(#bl-intro-template[data-bl-intro-mode="auth"]) > main.auth-shell {
  opacity: 0;
  animation: bl-auth-underlay-v5 160ms ease-out 340ms forwards;
}
@keyframes bl-auth-underlay-v5 {
  from { opacity: 0; }
  to { opacity: 1; }
}
@media (prefers-reduced-motion: reduce) {
  body.public-auth.auth-entry:has(#bl-intro-template[data-bl-intro-mode="auth"]) > main.auth-shell {
    opacity: 1;
    animation: none;
  }
}

/* AUTH_INTRO_V6: server-rendered first-paint pearl veil. */
.bl-auth-boot {
  position: fixed;
  inset: 0;
  z-index: 2147482999;
  background: #f7fafb;
  pointer-events: none;
  animation: bl-auth-boot-failopen-v6 1700ms linear both;
}

/* V6 boot veil replaces the old delayed-underlay workaround. */
body.public-auth.auth-entry:has(#bl-intro-template[data-bl-intro-mode="auth"]) > main.auth-shell {
  opacity: 1 !important;
  animation: none !important;
}

@keyframes bl-auth-boot-failopen-v6 {
  0%, 86% { opacity: 1; visibility: visible; }
  100% { opacity: 0; visibility: hidden; }
}

@media (prefers-reduced-motion: reduce) {
  .bl-auth-boot {
    display: none !important;
    animation: none !important;
  }
}
