/* ═══════════════════════════════════════════
   OASIS Portal – animations.css
   Preloader, Keyframes, Scroll Animations
   ═══════════════════════════════════════════ */

/* ── OASIS Loader (from CI-Logos pack) ── */
.oasis-loader {
  position: relative;
  width: 90px;
  height: 90px;
}

.oasis-hex {
  position: absolute;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
}

.oasis-loader__center {
  width: 34px;
  height: 34px;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  background: linear-gradient(135deg, var(--oasis-blue), var(--oasis-cyan));
  z-index: 2;
}

.oasis-loader__dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: white;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  z-index: 3;
  opacity: 0.9;
}

.oasis-loader__orbit {
  position: absolute;
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  animation: oasis-spin 4s linear infinite;
}

.oasis-loader__node {
  width: 16px;
  height: 16px;
  background: linear-gradient(90deg, var(--oasis-cyan), var(--oasis-mint));
}

.oasis-loader__node--1 { top: 13px;  left: 37px; }
.oasis-loader__node--2 { top: 25px;  left: 58px; }
.oasis-loader__node--3 { top: 49px;  left: 58px; }
.oasis-loader__node--4 { top: 61px;  left: 37px; }
.oasis-loader__node--5 { top: 49px;  left: 16px; }
.oasis-loader__node--6 { top: 25px;  left: 16px; }

.oasis-loader__node--1 { animation: oasis-pulse 1.5s ease-in-out 0.00s infinite; }
.oasis-loader__node--2 { animation: oasis-pulse 1.5s ease-in-out 0.25s infinite; }
.oasis-loader__node--3 { animation: oasis-pulse 1.5s ease-in-out 0.50s infinite; }
.oasis-loader__node--4 { animation: oasis-pulse 1.5s ease-in-out 0.75s infinite; }
.oasis-loader__node--5 { animation: oasis-pulse 1.5s ease-in-out 1.00s infinite; }
.oasis-loader__node--6 { animation: oasis-pulse 1.5s ease-in-out 1.25s infinite; }

@keyframes oasis-spin {
  0%   { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes oasis-pulse {
  0%, 100% { opacity: 0.35; }
  50%      { opacity: 1; }
}

.oasis-loader-text {
  margin-top: 14px;
  font-size: 11px;
  color: var(--oasis-cyan);
  letter-spacing: 4px;
  text-transform: uppercase;
  font-weight: 600;
  text-align: center;
  animation: oasis-textpulse 2s ease-in-out infinite;
}

@keyframes oasis-textpulse {
  0%, 100% { opacity: 0.3; }
  50%      { opacity: 1; }
}

/* ── Larger loader for preloader ── */
.oasis-loader--lg {
  width: 140px;
  height: 140px;
}
.oasis-loader--lg .oasis-loader__center { width: 52px; height: 52px; }
.oasis-loader--lg .oasis-loader__dot { width: 12px; height: 12px; }
.oasis-loader--lg .oasis-loader__node { width: 24px; height: 24px; }
.oasis-loader--lg .oasis-loader__node--1 { top: 20px;  left: 58px; }
.oasis-loader--lg .oasis-loader__node--2 { top: 38px;  left: 90px; }
.oasis-loader--lg .oasis-loader__node--3 { top: 76px;  left: 90px; }
.oasis-loader--lg .oasis-loader__node--4 { top: 96px;  left: 58px; }
.oasis-loader--lg .oasis-loader__node--5 { top: 76px;  left: 26px; }
.oasis-loader--lg .oasis-loader__node--6 { top: 38px;  left: 26px; }

/* ── Fade animations ── */
@keyframes fadeInUp {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes slideInLeft {
  from {
    opacity: 0;
    transform: translateX(-40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

@keyframes slideInRight {
  from {
    opacity: 0;
    transform: translateX(40px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

/* ── Floating animation for hero visual ── */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-12px); }
}

.float-animation {
  animation: float 4s ease-in-out infinite;
}

/* ── Gradient shift for buttons ── */
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.btn--primary {
  background-size: 200% 200%;
}

.btn--primary:hover {
  animation: gradientShift 3s ease infinite;
}

/* ── Hex diagram subtle rotation ── */
@keyframes hexRotate {
  0%, 100% { transform: rotate(0deg); }
  50%      { transform: rotate(3deg); }
}

/* ── Counter scroll animation helper ── */
.counter-animated {
  transition: all 0.3s ease;
}

/* ── Stagger children animation ── */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.animated > *:nth-child(1) { animation: fadeInUp 0.5s ease forwards 0.0s; }
.stagger-children.animated > *:nth-child(2) { animation: fadeInUp 0.5s ease forwards 0.1s; }
.stagger-children.animated > *:nth-child(3) { animation: fadeInUp 0.5s ease forwards 0.2s; }
.stagger-children.animated > *:nth-child(4) { animation: fadeInUp 0.5s ease forwards 0.3s; }
.stagger-children.animated > *:nth-child(5) { animation: fadeInUp 0.5s ease forwards 0.4s; }
.stagger-children.animated > *:nth-child(6) { animation: fadeInUp 0.5s ease forwards 0.5s; }
.stagger-children.animated > *:nth-child(7) { animation: fadeInUp 0.5s ease forwards 0.6s; }
.stagger-children.animated > *:nth-child(8) { animation: fadeInUp 0.5s ease forwards 0.7s; }
.stagger-children.animated > *:nth-child(9) { animation: fadeInUp 0.5s ease forwards 0.8s; }
.stagger-children.animated > *:nth-child(10) { animation: fadeInUp 0.5s ease forwards 0.9s; }
.stagger-children.animated > *:nth-child(11) { animation: fadeInUp 0.5s ease forwards 1.0s; }
.stagger-children.animated > *:nth-child(12) { animation: fadeInUp 0.5s ease forwards 1.1s; }
.stagger-children.animated > *:nth-child(13) { animation: fadeInUp 0.5s ease forwards 1.2s; }
.stagger-children.animated > *:nth-child(14) { animation: fadeInUp 0.5s ease forwards 1.3s; }

/* ═══════════════════════════════════════════
   KanzleiApp Login → Split Animation
   ═══════════════════════════════════════════ */
.app__phones-wrapper {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 520px;
}

/* Login phone (single, centered) */
.app__login-phone {
  position: absolute;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  transition: opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1),
              transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.app__login-phone.split {
  opacity: 0;
  transform: translateX(-50%) scale(0.85);
  pointer-events: none;
}

/* Split phones (two phones side by side) */
.app__split-phones {
  display: flex;
  gap: 24px;
  justify-content: center;
  align-items: flex-start;
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s,
              transform 0.7s cubic-bezier(0.4, 0, 0.2, 1) 0.3s;
  pointer-events: none;
}

.app__split-phones.visible {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

/* Login screen content styling — same dimensions as split phone content */
.login-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 24px 20px 16px;
  background: #EEEEF4;
  min-height: 340px;
  max-height: 340px;
  overflow: hidden;
}

.login-screen__logo {
  position: relative;
  width: 56px;
  height: 56px;
  margin-bottom: 16px;
}

.login-screen__hex {
  width: 56px;
  height: 56px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: var(--oasis-gradient-primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-screen__hex-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: white;
  opacity: 0.9;
}

.login-screen__title {
  font-size: 13px;
  font-weight: 700;
  color: var(--oasis-text-dark);
  margin-bottom: 2px;
}

.login-screen__subtitle {
  font-size: 10px;
  color: var(--oasis-text-medium);
  margin-bottom: 20px;
}

.login-screen__form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.login-screen__input {
  width: 100%;
  background: white;
  border: 1px solid #D8D8DD;
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 9px;
  color: #999;
  box-sizing: border-box;
}

.login-screen__btn {
  width: 100%;
  padding: 10px;
  border-radius: 8px;
  background: var(--oasis-gradient-primary);
  color: white;
  font-size: 10px;
  font-weight: 600;
  text-align: center;
  margin-top: 4px;
  box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

.login-screen__biometric {
  font-size: 8px;
  color: var(--oasis-blue);
  margin-top: 10px;
  cursor: pointer;
}

.login-screen__footer {
  margin-top: auto;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.login-screen__footer-logo {
  width: 28px;
  height: 28px;
  clip-path: polygon(50% 0%, 93% 25%, 93% 75%, 50% 100%, 7% 75%, 7% 25%);
  background: var(--oasis-gradient-secondary);
  opacity: 0.3;
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-screen__footer-logo-dot {
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: white;
  opacity: 0.8;
}

.login-screen__footer-text {
  font-size: 7px;
  color: var(--oasis-text-medium);
  opacity: 0.5;
  letter-spacing: 1px;
  text-transform: uppercase;
}

/* Responsive */
@media (max-width: 480px) {
  .app__split-phones {
    flex-direction: column;
    align-items: center;
  }
}
