.rasta-rain-panel { position: relative; isolation: isolate; }
.rasta-rain-layer {
  position: absolute;
  inset: 0;
  z-index: -1;
  inline-size: 100%;
  block-size: 100%;
  pointer-events: none;
}

main > .rasta-rain-panel::before,
#keycloak-bg .pf-v5-c-login__container.rasta-rain-panel::before,
#keycloak-bg #kc-header.rasta-rain-panel::after { content: none; }

#keycloak-bg .rasta-rain-layer.rasta-rain-grid { grid-area: main; }

.rasta-rain-layer.rasta-rain-gutter {
  opacity: 0.55;
  mask-image: linear-gradient(90deg, #000, #000a 14%, #0000 30%, #0000 70%, #000a 86%, #000);
}

html [data-rasta-intro-overlay]::before,
html [data-rasta-intro-overlay]::after { content: none; }

html [data-rasta-intro-overlay] > div,
.rasta-kc-splash-stage {
  position: relative;
  z-index: 1;
  display: grid;
  width: min(94vw, 780px);
  justify-items: center;
  row-gap: clamp(0.2rem, 1.4vh, 0.7rem);
  animation: none;
}

html [data-rasta-intro-overlay] > div::after,
.rasta-kc-splash-network {
  display: block;
  content: '';
  inline-size: min(87vw, 560px);
  block-size: clamp(115px, 31vh, 245px);
  background: url('../img/operations.svg') center / contain no-repeat;
  animation: rasta-graph-arrive 900ms 260ms ease-out both;
}

html [data-rasta-intro-overlay] > div img,
.rasta-kc-splash-logo {
  inline-size: clamp(55px, 12vh, 104px);
  block-size: auto;
  animation: rasta-logo-arrive 760ms ease-out both;
}

html [data-rasta-intro-overlay] > div span,
.rasta-kc-splash-stage span {
  font-size: clamp(1.8rem, 4.5vh, 3.4rem);
  line-height: 1.22;
}

.rasta-kc-splash {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  overflow: hidden;
  place-items: center;
  background: radial-gradient(ellipse at 50% 83%, #15594f, #0b2932 54%, #071d28 98%);
  color: #f5fcfa;
  font-family: Vazirmatn, sans-serif;
  font-weight: 800;
  animation: rasta-splash-end 5s ease both;
}

.rasta-kc-splash-logo {
  aspect-ratio: 1;
  background: url('../img/rasta.svg') center / contain no-repeat;
  filter: drop-shadow(0 15px 28px #03161a9c);
}

@keyframes rasta-graph-arrive {
  from { opacity: 0; transform: translateY(13px) scale(0.97); }
  to { opacity: 0.96; transform: translateY(0) scale(1); }
}

@keyframes rasta-logo-arrive {
  from { opacity: 0; transform: translateY(10px) scale(0.86); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes rasta-splash-end {
  0%, 88% { visibility: visible; opacity: 1; }
  100% { visibility: hidden; opacity: 0; }
}
html [data-rasta-intro-overlay].rasta-rain-panel { position: fixed; }


html[data-rasta-intro='active'] [data-rasta-intro-overlay] {
  display: grid;
  animation: rasta-splash-end 5s ease both;
}
html [data-rasta-intro-overlay] > div span,
.rasta-kc-splash-stage span {
  display: grid;
  justify-items: center;
  direction: ltr;
  font-size: 0;
  line-height: 0;
}
html [data-rasta-intro-overlay] > div span::after,
.rasta-kc-splash-stage span::after {
  content: 'RASTA';
  display: block;
  inline-size: 5ch;
  overflow: hidden;
  white-space: nowrap;
  color: #effdf8;
  font: 700 clamp(1.65rem, 4.5vh, 3.15rem)/1.14 ui-monospace, Consolas, monospace;
  animation: rasta-word-origin 440ms 560ms ease both, rasta-word-expand 920ms 1000ms steps(4, end) both;
}
@keyframes rasta-word-origin {
  from { opacity: 0; transform: translateY(-1.35em) scale(.55); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes rasta-word-expand {
  from { inline-size: 1ch; }
  to { inline-size: 5ch; }
}
html [data-rasta-intro-overlay] > div::after,
.rasta-kc-splash-network {
  inline-size: min(99vw, 680px);
  block-size: clamp(175px, 40vh, 330px);
  animation-delay: 900ms;
}


@layer base {
  html[data-rasta-intro='active'] [data-rasta-intro-overlay] {
    animation-duration: 5s !important;
  }
  html[data-rasta-intro='active'] [data-rasta-intro-overlay] > div::after {
    animation-duration: 900ms !important;
  }
}

html [data-rasta-intro-overlay] > div,
.rasta-kc-splash-stage {
  --rasta-badge: clamp(60px, 12.5vh, 110px);
  row-gap: clamp(1rem, 3vh, 2rem);
}
html [data-rasta-intro-overlay] > div img,
.rasta-kc-splash-logo { display: none; }
html [data-rasta-intro-overlay] > div span,
.rasta-kc-splash-stage span {
  position: static;
  grid-row: 1;
  display: block;
  inline-size: min(88vw, calc(var(--rasta-badge) * 3));
  block-size: calc(var(--rasta-badge) * 1.25);
  border: 0;
  border-radius: 0;
  background: url('../img/wordmark-motion.svg') center / contain no-repeat;
  box-shadow: none;
  color: transparent;
  animation: none;
}
html [data-rasta-intro-overlay] > div span::after,
.rasta-kc-splash-stage span::after { content: none; }
html [data-rasta-intro-overlay] > div::after,
.rasta-kc-splash-network {
  inline-size: min(96vw, 660px);
  block-size: clamp(198px, 50vh, 388px);
  background-image: url('../img/operations-focus.svg');
  animation-delay: 1050ms;
}

html [data-rasta-intro-overlay] > div,
.rasta-kc-splash-stage { width: min(100%, 780px); }
