/* Engaz Books — intro.css (v4): «من الأرقام للّوجو». أرقام بتلف وتستقر بألوان اللوجو، ثم اللوجو الحاد، ثم عدّاد التحميل. */
.intro {
  display: none;
}
html.intro-on .intro {
  display: grid;
  place-content: center;
  justify-items: center;
  row-gap: 30px;
  position: fixed;
  inset: 0;
  z-index: 1000;
  background: #fff;
  cursor: default;
  overflow: hidden;
  transition: opacity 460ms cubic-bezier(0.16, 1, 0.3, 1);
}
html.intro-on .intro.out {
  opacity: 0;
  pointer-events: none;
}
.intro-glow {
  position: absolute;
  left: 50%;
  top: 50%;
  width: min(64vw, 620px);
  aspect-ratio: 1;
  translate: -50% -56%;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(
    closest-side,
    rgba(6, 68, 232, 0.11),
    rgba(6, 68, 232, 0.035) 55%,
    rgba(6, 68, 232, 0) 72%
  );
  opacity: 0;
  transform: scale(0.7);
}
.intro.play .intro-glow {
  animation: ebi-glow 1400ms cubic-bezier(0.16, 1, 0.3, 1) 0ms both;
}
.intro-logo {
  position: relative;
  aspect-ratio: 1373.5/438;
  width: clamp(260px, 38vw, 540px);
  transition:
    transform 460ms cubic-bezier(0.16, 1, 0.3, 1),
    opacity 400ms cubic-bezier(0.16, 1, 0.3, 1);
}
.intro.out .intro-logo {
  transform: scale(0.975);
  opacity: 0;
}
.intro-logo svg,
.intro-logo img {
  display: block;
  width: 100%;
  height: auto;
  overflow: visible;
}
.intro-logo .vec {
  position: absolute;
  inset: 0;
  opacity: 0;
}
.intro.play .vec {
  animation: ebi-fade 560ms cubic-bezier(0.16, 1, 0.3, 1) 1780ms both;
}
.intro.play .nums {
  animation: ebi-nums-out 560ms cubic-bezier(0.16, 1, 0.3, 1) 1780ms both;
}
.nums text {
  font:
    700 20.8px/1 ui-monospace,
    'SF Mono',
    Menlo,
    Consolas,
    monospace;
  text-anchor: middle;
  dominant-baseline: central;
  fill: #aeb8c9;
  font-variant-numeric: tabular-nums;
  transform-box: fill-box;
  transform-origin: center;
  transition:
    fill 220ms ease,
    opacity 420ms ease;
}
.nums text.no {
  fill: #cbd3df;
}
.nums text.on {
  animation: ebi-pop 360ms cubic-bezier(0.16, 1, 0.3, 1) both;
}
.nums text.gone {
  opacity: 0;
}
.intro.quick .vec {
  opacity: 1;
  animation: ebi-fade 320ms ease-out both;
}
.intro.quick .intro-glow {
  animation: ebi-fade 320ms ease-out both;
}
/* عدّاد التحميل */
.intro-load {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  opacity: 0;
}
.intro.play .intro-load {
  animation: ebi-fade 320ms ease-out 2150ms both;
}
.intro-load .bar {
  display: block;
  width: 180px;
  height: 3px;
  border-radius: 99px;
  background: #e4e9f6;
  overflow: hidden;
}
.intro-load .bar i {
  display: block;
  height: 100%;
  width: 100%;
  border-radius: 99px;
  background: linear-gradient(90deg, #0644e8, #1257f7);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.intro.play .intro-load .bar i {
  animation: ebi-load 820ms cubic-bezier(0.4, 0, 0.2, 1) 2200ms both;
}
.intro-load .txt {
  font: 600 13px/1 var(--font, 'Tajawal', system-ui, sans-serif);
  color: #6f7a8e;
  padding-top: 0.16em;
}
.intro-load .pct {
  display: inline-block;
  min-width: 34px;
  font-weight: 800;
  color: #0b4cec;
  font-variant-numeric: tabular-nums;
  direction: ltr;
}
.intro.quick .intro-load {
  display: none;
}
@keyframes ebi-fade {
  from {
    opacity: 0;
  }
  to {
    opacity: 1;
  }
}
@keyframes ebi-glow {
  from {
    opacity: 0;
    transform: scale(0.7);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}
@keyframes ebi-pop {
  from {
    transform: scale(1.35);
  }
  to {
    transform: none;
  }
}
@keyframes ebi-nums-out {
  to {
    opacity: 0;
    filter: blur(2px);
  }
}
@keyframes ebi-load {
  from {
    transform: scaleX(0);
  }
  to {
    transform: scaleX(0.99);
  }
}
@media (prefers-reduced-motion: reduce) {
  .intro.play .nums {
    display: none;
  }
  .intro.play .vec {
    animation: ebi-fade 320ms ease-out both;
  }
  .intro-load {
    display: none;
  }
}

/* The login cannot receive focus or autofill while the opening is visible. */
html.intro-on app-root {
  visibility: hidden;
}
.intro-hint {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
html.intro-on .intro:focus-visible {
  outline: 2px solid #0b4cec;
  outline-offset: -4px;
}
@media (prefers-reduced-motion: reduce) {
  html.intro-on .intro,
  .intro.out .intro-logo {
    transition: none;
  }
  .intro.quick .vec,
  .intro.quick .intro-glow {
    animation: none;
    opacity: 1;
    transform: none;
  }
}
@media (max-width: 320px) {
  .intro-logo {
    width: calc(100vw - 32px);
  }
}
