/* ═══════════════════════════════════════
   VET Studio Homepage Styles
   ═══════════════════════════════════════ */

/* ── Particle Assemble Loading Animation ── */

/* Initial hidden state — applied before animation class added */
.loading-init .logo-area { opacity: 0; }
.loading-init .logo {
  opacity: 0;
  transform: scale(0.3) rotate(15deg);
  filter: blur(8px);
}
.loading-init .desktop-title {
  opacity: 0;
  transform: translateY(10px);
}
.loading-init .desktop-sub {
  opacity: 0;
  transform: translateY(10px);
}
.loading-init .wgrid .xpw {
  opacity: 0;
}

/* Particle field */
.particle-field {
  position: absolute;
  inset: 0;
  z-index: 22;
  pointer-events: none;
  overflow: hidden;
}
.particle-field .particle {
  position: absolute;
  background: #32F08C;
  border-radius: 50%;
  opacity: 0;
  animation: particle-fly 1.5s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}

/* Animation: triggered by .anim-particle on .desktop */
.anim-particle .logo {
  animation: particle-logo 2.2s cubic-bezier(0.22, 0.61, 0.36, 1) forwards;
}
.anim-particle .desktop-title {
  animation: particle-title 2.2s ease forwards;
}
.anim-particle .desktop-sub {
  animation: particle-sub 2.2s ease forwards;
}
.anim-particle .wgrid .xpw:nth-child(1) {
  animation: particle-card-tl 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.3s forwards;
}
.anim-particle .wgrid .xpw:nth-child(2) {
  animation: particle-card-tr 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.45s forwards;
}
.anim-particle .wgrid .xpw:nth-child(3) {
  animation: particle-card-bl 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.6s forwards;
}
.anim-particle .wgrid .xpw:nth-child(4) {
  animation: particle-card-br 0.6s cubic-bezier(0.34, 1.56, 0.64, 1) 1.75s forwards;
}

@keyframes particle-logo {
  0% { opacity: 0; transform: scale(0.3) rotate(15deg); filter: blur(8px); }
  20% { opacity: 0.6; filter: blur(4px); transform: scale(0.5) rotate(5deg); }
  50% { transform: scale(1.1) rotate(-2deg); filter: blur(1px); opacity: 1; }
  70% { transform: scale(0.95) rotate(1deg); }
  100% { opacity: 1; transform: scale(1) rotate(0); filter: blur(0); }
}
@keyframes particle-title {
  0%, 30% { opacity: 0; transform: translateY(10px); }
  50% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes particle-sub {
  0%, 50% { opacity: 0; transform: translateY(10px); }
  70% { opacity: 1; }
  100% { opacity: 1; transform: translateY(0); }
}
@keyframes particle-card-tl {
  0% { opacity: 0; transform: translate(-80px, -40px) scale(0.7) rotate(-10deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
}
@keyframes particle-card-tr {
  0% { opacity: 0; transform: translate(80px, -40px) scale(0.7) rotate(10deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
}
@keyframes particle-card-bl {
  0% { opacity: 0; transform: translate(-80px, 40px) scale(0.7) rotate(-10deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
}
@keyframes particle-card-br {
  0% { opacity: 0; transform: translate(80px, 40px) scale(0.7) rotate(10deg); }
  100% { opacity: 1; transform: translate(0, 0) scale(1) rotate(0); }
}
@keyframes particle-fly {
  0% { opacity: 0.8; transform: translate(var(--px), var(--py)) scale(1.5); }
  60% { opacity: 0.4; }
  100% { opacity: 0; transform: translate(0, 0) scale(0); }
}

/* Cleanup after animation completes */
.anim-done .desktop-title,
.anim-done .desktop-sub,
.anim-done .wgrid .xpw {
  opacity: 1 !important;
  transform: none !important;
  filter: none !important;
  animation: none !important;
}
.anim-done .logo {
  opacity: 1 !important;
  filter: none !important;
  animation: none !important;
}

/* Desktop container */
.desktop {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  padding: 30px 30px 64px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* Parallax wrapper */
.parallax-stage {
  display: flex;
  flex-direction: column;
  align-items: center;
  transition: transform 0.25s var(--ease-smooth);
  will-change: transform;
}

/* Logo area */
.logo-area {
  margin-bottom: 20px;
  text-align: center;
}
.logo-wrap { display: inline-block }
.logo {
  width: 72px; height: 72px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--logo-bg);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  box-shadow: 0 0 30px rgba(50,240,140,0.2), 0 2px 10px rgba(0,0,0,0.3);
  will-change: transform;
  transition: transform 0.25s var(--ease-smooth);
}
.logo svg, .logo .vet-logo-main { width: 56px; height: 56px }
.logo .vet-logo-main { border-radius: 8px; }
.logo::after {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(100,180,255,0.08), rgba(180,100,255,0.05), rgba(100,255,200,0.07));
  background-size: 200% 200%;
  animation: holoShimmer 5s ease-in-out infinite;
  pointer-events: none;
  mix-blend-mode: screen;
}

/* Title typography */
.desktop-title {
  font-size: clamp(1.8rem, 4.5vw, 3rem);
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #fff;
  margin-top: 10px;
  text-shadow: 0 2px 12px rgba(0,0,0,0.3), 0 0 30px rgba(100,180,255,0.15);
}
.desktop-sub {
  color: rgba(255,255,255,0.65);
  font-size: 0.9rem;
  max-width: 440px;
  line-height: 1.7;
  margin-top: 6px;
  text-shadow: 0 1px 4px rgba(0,0,0,0.2);
}

/* Window grid */
.wgrid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 20px;
  max-width: 880px;
  width: 100%;
  margin-top: 32px;
}
