/* ---------------------------
   RESET
--------------------------- */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

html, body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

/* ---------------------------
   BODY / BACKGROUND
--------------------------- */
body {
  background: #000; /* initial black background */
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'Playfair Display', serif;
  perspective: 1000px;
  transition: background 1s ease-in; /* smooth background fade */
  padding: env(safe-area-inset-top)
           env(safe-area-inset-right)
           env(safe-area-inset-bottom)
           env(safe-area-inset-left);
}

/* Animate background fade-in */
body.loaded {
  background: linear-gradient(135deg, #194239 0%, #1f524a 50%, #256459 100%);
}

/* iOS height fix */
@supports (-webkit-touch-callout: none) {
  body {
    min-height: -webkit-fill-available;
  }
}

/* ---------------------------
   SPLASH GROUP
--------------------------- */
.splash-group {
  display: flex;
  flex-direction: column;
  align-items: center;
  opacity: 0;
  transform: scale(0);
  animation: logoAppear 5s ease forwards;
  animation-delay: 0.8s; /* after background appears */
  transform-origin: center;
}

/* ---------------------------
   LOGOS
--------------------------- */
.logo2 {
  width: 100px;
  max-width: 40vw;
  margin-bottom: 20px;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.2));
}

.logo-wrapper {
  position: relative;
  width: 280px;
  max-width: 80vw;
  aspect-ratio: 1;
}

.logo-base {
  width: 100%;
  display: block;
  filter: drop-shadow(0 4px 20px rgba(0,0,0,0.3));
  position: relative;
}

.logo-z {
  position: absolute;
  top: 10%;           /* adjust as needed */
  left: 28.5%;          /* adjust as needed */
  width: 13.5%;         /* relative to parent, scales proportionally */
  height: auto;       /* maintain aspect ratio */
  transform: none;
  transform-style: preserve-3d;
  animation: spinZ 3.5s ease-out forwards;
  filter: drop-shadow(0 2px 10px rgba(0,0,0,0.2));
}

/* ---------------------------
   ANIMATIONS
--------------------------- */
/* Logo zoom + fade in/out */
@keyframes logoAppear {
  0% {
    transform: scale(0);
    opacity: 0;
  }
  20% {
    transform: scale(1.2);
    opacity: 1;
  }
  50% {
    transform: scale(1);
    opacity: 1;
  }
  80% {
    transform: scale(1.2);
    opacity: 0.8;
  }
  100% {
    transform: scale(0);
    opacity: 0;
  }
}

/* Subtle Z spin */
@keyframes spinZ {
  0%   { transform: rotateY(0deg); }
  50%  { transform: rotateY(180deg); }
  100% { transform: rotateY(360deg); }
}

/* ---------------------------
   RESPONSIVE
--------------------------- */
@media (max-width: 400px) {
  .logo-wrapper { width: 220px; }
  .logo2 { width: 80px; }
}

@media (min-width: 600px) {
  .logo-wrapper { width: 350px; }
  .logo2 { width: 150px; }
}
