/* Shared motion — login + contact (CSP-safe, no inline scripts) */

:root {
  --motion-spring: cubic-bezier(0.32, 0.72, 0.28, 1);
  --motion-ease: cubic-bezier(0.22, 1, 0.36, 1);
  --motion-out: cubic-bezier(0.16, 1, 0.3, 1);
  --motion-duration: 0.55s;
  --motion-fast: 0.22s;
}

@keyframes rise {
  from { opacity: 0; transform: translateY(18px); }
  to { opacity: 1; transform: none; }
}

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

@keyframes scale-in {
  from { opacity: 0; transform: scale(0.96); }
  to { opacity: 1; transform: none; }
}

@keyframes sheet {
  from { opacity: 0; transform: translateY(28px) scale(0.985); }
  to { opacity: 1; transform: none; }
}

@keyframes splash-mark {
  from { opacity: 0; transform: scale(0.92); letter-spacing: 0.12em; }
  to { opacity: 1; transform: none; letter-spacing: 0.04em; }
}

@keyframes press {
  from { transform: scale(1); }
  to { transform: scale(0.97); }
}

.motion-rise {
  animation: rise var(--motion-duration) var(--motion-spring) both;
}

.motion-fade {
  animation: fade var(--motion-duration) var(--motion-ease) both;
}

.motion-scale-in {
  animation: scale-in var(--motion-duration) var(--motion-spring) both;
}

.motion-sheet {
  animation: sheet 0.65s var(--motion-spring) both;
}

.motion-stagger > *:nth-child(1) { animation-delay: 0.04s; }
.motion-stagger > *:nth-child(2) { animation-delay: 0.1s; }
.motion-stagger > *:nth-child(3) { animation-delay: 0.16s; }
.motion-stagger > *:nth-child(4) { animation-delay: 0.22s; }
.motion-stagger > *:nth-child(5) { animation-delay: 0.28s; }
.motion-stagger > *:nth-child(6) { animation-delay: 0.34s; }

.motion-stagger > * {
  animation: rise 0.5s var(--motion-spring) both;
}

.btn-press:active {
  animation: press 0.12s var(--motion-ease) both;
}

/* ── Boot splash ──────────────────────────────────────────────────────────
 *
 * VYTHO γράμμα-γράμμα: κάθε γράμμα ανεβαίνει και «καθαρίζει» από το blur,
 * από κάτω μια λεπτή γραμμή φωτός ανοίγει από το κέντρο. Η έξοδος δεν είναι
 * σκέτο σβήσιμο — το σήμα μεγαλώνει ανεπαίσθητα και διαλύεται, σαν να
 * βυθίζεται στο φόντο που έρχεται. Όλα expo-out, τίποτα δεν αναπηδά.
 *
 * Το σκέτο .boot-mark (χωρίς spans) κρατά την παλιά κίνηση — το index.html
 * το χρησιμοποιεί ακόμα έτσι.
 */
@keyframes boot-letter {
  from { opacity: 0; transform: translateY(16px); filter: blur(10px); }
  to { opacity: 1; transform: none; filter: blur(0); }
}

@keyframes boot-line {
  from { transform: scaleX(0); opacity: 0; }
  to { transform: scaleX(1); opacity: 1; }
}

#bootSplash {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: grid;
  place-items: center;
  background:
    radial-gradient(42rem 42rem at 50% 44%, rgba(255, 255, 255, 0.05), transparent 62%),
    #0a0a0a;
  transition: opacity 0.55s var(--motion-out), visibility 0.55s linear;
  opacity: 1;
  visibility: visible;
  pointer-events: all;
}

#bootSplash.is-done {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

#bootSplash .boot-wrap {
  display: grid;
  justify-items: center;
}

#bootSplash .boot-mark {
  font-family: "DM Sans", system-ui, sans-serif;
  font-weight: 800;
  font-size: clamp(2.4rem, 8vw, 3.4rem);
  letter-spacing: 0.04em;
  font-stretch: normal;
  line-height: 1;
  color: #fff;
  text-transform: uppercase;
  animation: splash-mark 0.55s var(--motion-spring) both;
}

/* Εκδοχή με γράμματα: η κίνηση φεύγει από τον γονιό, τη σηκώνουν τα spans. */
#bootSplash .boot-mark--letters {
  animation: none;
}

#bootSplash .boot-mark--letters span {
  display: inline-block;
  animation: boot-letter 0.5s var(--motion-out) both;
}

#bootSplash .boot-mark--letters span:nth-child(1) { animation-delay: 0.05s; }
#bootSplash .boot-mark--letters span:nth-child(2) { animation-delay: 0.095s; }
#bootSplash .boot-mark--letters span:nth-child(3) { animation-delay: 0.14s; }
#bootSplash .boot-mark--letters span:nth-child(4) { animation-delay: 0.185s; }
#bootSplash .boot-mark--letters span:nth-child(5) { animation-delay: 0.23s; }

#bootSplash .boot-line {
  width: 8.5rem;
  height: 1px;
  margin-top: 1.15rem;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.65), transparent);
  transform-origin: 50% 50%;
  animation: boot-line 0.7s var(--motion-out) 0.3s both;
}

/* Έξοδος: μόνο για την εκδοχή με γράμματα — εκεί ο γονιός δεν έχει δική του
 * animation, άρα τα transitions πιάνουν. */
#bootSplash .boot-mark--letters,
#bootSplash .boot-line {
  transition:
    opacity 0.45s var(--motion-out),
    transform 0.45s var(--motion-out),
    filter 0.45s var(--motion-out);
}

#bootSplash.is-done .boot-mark--letters {
  opacity: 0;
  transform: scale(1.06);
  filter: blur(8px);
}

#bootSplash.is-done .boot-line {
  opacity: 0;
  transform: scaleX(1.25);
}
