/* Ambient living map — layered motion */

.layer-water path,
.layer-water {
  animation: water-shimmer 9s ease-in-out infinite;
}

@keyframes water-shimmer {
  0%, 100% { opacity: 0.92; filter: brightness(1); }
  50% { opacity: 1; filter: brightness(1.08); }
}

.layer-forest {
  animation: forest-breathe 14s ease-in-out infinite;
}

.layer-estates circle {
  animation: estate-glow 6s ease-in-out infinite;
}

.layer-estates g:nth-child(2) circle { animation-delay: -2s; }
.layer-estates g:nth-child(3) circle { animation-delay: -4s; }
.layer-estates circle:nth-of-type(2) { animation-delay: -1.5s; }
.layer-estates circle:nth-of-type(4) { animation-delay: -3s; }

@keyframes estate-glow {
  0%, 100% { opacity: 0.85; }
  50% { opacity: 1; }
}

@keyframes forest-breathe {
  0%, 100% { opacity: 0.88; }
  50% { opacity: 0.96; }
}

.cloud-drift-a { animation: cloud-drift 100s linear infinite; }
.cloud-drift-b { animation: cloud-drift 130s linear infinite reverse; }
.cloud-drift-c { animation: cloud-drift 110s linear infinite; animation-delay: -40s; }

@keyframes cloud-drift {
  0% { transform: translateX(0); }
  100% { transform: translateX(140px); }
}

.fog-sheet-a { animation: fog-roll 28s ease-in-out infinite; }
.fog-sheet-b { animation: fog-roll 36s ease-in-out infinite reverse; opacity: 0.45; }
.fog-valley { animation: fog-valley 20s ease-in-out infinite; }

@keyframes fog-roll {
  0%, 100% { opacity: 0.4; transform: translateX(0); }
  50% { opacity: 0.65; transform: translateX(50px); }
}

@keyframes fog-valley {
  0%, 100% { opacity: 0.06; transform: scaleX(1); }
  50% { opacity: 0.12; transform: scaleX(1.05); }
}

.world-vignette {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 50;
  opacity: 0.65;
  background:
    radial-gradient(ellipse 75% 68% at 50% 46%, transparent 32%, rgba(4, 4, 3, 0.42) 100%);
}

.world-grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 51;
  opacity: 0.018;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 512 512' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain-shift 0.5s steps(2) infinite;
}

@keyframes grain-shift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-2%, -1%); }
}

.particles {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 6;
  overflow: hidden;
}

.particle {
  position: absolute;
  width: 2px;
  height: 2px;
  background: rgba(201, 169, 98, 0.2);
  border-radius: 50%;
  box-shadow: 0 0 4px rgba(201, 169, 98, 0.3);
  animation: particle-float 20s linear infinite;
}

@keyframes particle-float {
  0% { transform: translateY(105vh) translateX(0); opacity: 0; }
  8% { opacity: 0.5; }
  92% { opacity: 0.2; }
  100% { transform: translateY(-5vh) translateX(50px); opacity: 0; }
}

.world--focused .particle { opacity: 0.15; }

@media (prefers-reduced-motion: reduce) {
  .layer-water, .layer-forest, .layer-estates circle,
  .cloud-drift-a, .cloud-drift-b, .cloud-drift-c,
  .fog-sheet-a, .fog-sheet-b, .fog-valley,
  .particle, .world-grain, .shadow-band, .world-lighting--bloom {
    animation: none !important;
  }
}
