/* Ecran de pornire (splash) cu logo-ul animat Gospodaria9.
   Animația logo-ului e preluată din logo-animat.html și scopată sub #splash. */

#splash {
  position: fixed; inset: 0; z-index: 9999;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 35%, #ffffff 0%, #f0f0ee 100%);
  transition: opacity .6s ease, visibility .6s ease;
}
#splash.hide { opacity: 0; visibility: hidden; }

#splash .logo-wrap { width: min(85vw, 560px); }
#splash svg {
  width: 100%; height: auto; display: block; overflow: visible;
  shape-rendering: geometricPrecision;
  text-rendering: geometricPrecision;
}

/* === ICONIȚA (grup colorat + linia neagră) === */
#splash #icon {
  opacity: 0;
  animation:
    fade 0.4s ease-out 0.1s forwards,
    respira 4.5s ease-in-out 3.5s infinite;
}

/* Ovalul colorat apare cu o ușoară creștere */
#splash #oval {
  transform-origin: 63px 95px;
  transform-box: view-box;
  opacity: 0;
  animation: oval-in 0.6s cubic-bezier(.2,1.1,.3,1) 0.1s forwards;
}
#splash .cls-1 { opacity: 0; animation: fade .55s ease-out .15s forwards; }  /* galben */
#splash .cls-2 { opacity: 0; animation: fade .55s ease-out .40s forwards; }  /* portocaliu */
#splash .cls-3 { opacity: 0; animation: fade .55s ease-out .65s forwards; }  /* verde */

/* Linia neagră: write-on progresiv */
#splash #icon-line { fill: #1a1a1a; }
#splash .mask-path {
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: incarca 2.6s ease-in-out 0.7s forwards;
}

/* === TEXTUL „GOSPODARIA9" === */
#splash #word {
  transform-origin: left center;
  transform-box: view-box;
  transform: translateY(14px);
  opacity: 0;
  animation: word-rise .7s cubic-bezier(.2,1,.3,1) 1.6s forwards;
}
#splash #word path { opacity: 0; animation: fade .5s ease-out forwards; }
#splash #word path:nth-child(1)  { animation-delay: 1.70s }
#splash #word path:nth-child(2)  { animation-delay: 1.75s }
#splash #word path:nth-child(3)  { animation-delay: 1.80s }
#splash #word path:nth-child(4)  { animation-delay: 1.85s }
#splash #word path:nth-child(5)  { animation-delay: 1.90s }
#splash #word path:nth-child(6)  { animation-delay: 1.95s }
#splash #word path:nth-child(7)  { animation-delay: 2.00s }
#splash #word path:nth-child(8)  { animation-delay: 2.05s }
#splash #word path:nth-child(9)  { animation-delay: 2.10s }
#splash #word path:nth-child(10) { animation-delay: 2.15s }
#splash #word path:nth-child(11) { animation-delay: 2.20s }

@keyframes fade { to { opacity: 1 } }
@keyframes oval-in { from { opacity: 0; transform: scale(.85); } to { opacity: 1; transform: scale(1); } }
@keyframes incarca { to { stroke-dashoffset: 0; } }
@keyframes word-rise { to { opacity: 1; transform: translateY(0); } }
@keyframes respira { 0%,100% { transform: scale(1); } 50% { transform: scale(1.035); } }

@media (prefers-reduced-motion: reduce) {
  #splash * { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
  #splash .mask-path { stroke-dashoffset: 0; }
}
