/* MOONFAR atmosphere. Decorative, procedural and independent of interactive works.
   No layout, content, navigation, Sphere or carousel animation is replaced here. */
:root {
  --atmosphere-period:52s;
  --atmosphere-navy:rgba(42,67,101,.16);
  --atmosphere-gold:rgba(156,132,91,.04);
  --atmosphere-grain:.026;
}
body { isolation:isolate; }
/* One shallow field extends behind all chapters, so chapter edges stay quiet. */
body::before {
  content:"";
  position:fixed;
  inset:-5vh -5vw;
  z-index:-1;
  pointer-events:none;
  background:
    radial-gradient(circle at 14% 21%,#d4deeb45 0 .55px,transparent .95px),
    radial-gradient(circle at 79% 14%,#d4deeb36 0 .55px,transparent .95px),
    radial-gradient(circle at 92% 54%,#d4deeb36 0 .55px,transparent .95px),
    radial-gradient(circle at 68% 76%,#c4d1e340 0 .55px,transparent .95px),
    radial-gradient(circle at 33% 68%,#c4d1e334 0 .5px,transparent .95px),
    radial-gradient(circle at 53% 38%,#c4d1e326 0 .5px,transparent .95px),
    radial-gradient(circle at 7% 81%,#c4d1e334 0 .5px,transparent .95px),
    radial-gradient(ellipse 62% 48% at 79% 27%,var(--atmosphere-navy),transparent 76%),
    radial-gradient(ellipse 51% 56% at 9% 79%,#172c4938,transparent 76%),
    radial-gradient(ellipse 31% 37% at 64% 63%,var(--atmosphere-gold),transparent 80%);
  animation:mf-atmosphere-drift var(--atmosphere-period) ease-in-out infinite alternate;
  animation-play-state:paused;
  transform:translate3d(-1%,0,0);
}
/* Static, very fine procedural grain: no bitmap download or frame-by-frame noise. */
body::after {
  content:"";
  position:fixed;
  inset:0;
  z-index:-1;
  opacity:var(--atmosphere-grain);
  pointer-events:none;
  background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.86' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Cpath fill='%23fff' filter='url(%23g)' opacity='.65' d='M0 0h180v180H0z'/%3E%3C/svg%3E");
  background-size:180px 180px;
}
body.mf-atmosphere-live::before { animation-play-state:running; }
/* Existing hero geometry receives only slow light and trace movement. */
.hero .nebula {
  background:
    radial-gradient(ellipse at 67% 44%,#28456828,transparent 43%),
    radial-gradient(ellipse at 26% 69%,#243f571a,transparent 38%);
  opacity:.75;
  animation:mf-soft-light 38s var(--motion-ease-spatial) infinite alternate;
  animation-play-state:paused;
}
.hero .light-path {
  border-color:#baa47618;
  box-shadow:none;
  opacity:.56;
  animation:mf-orbit-trace 58s ease-in-out infinite alternate;
  animation-play-state:paused;
}
.hero .light-path.path-two {
  border-color:#9daec516;
  opacity:.42;
  animation-name:mf-orbit-trace-secondary;
  animation-duration:68s;
  animation-direction:alternate-reverse;
}
.hero.mf-scene-active .nebula,
.hero.mf-scene-active .light-path { animation-play-state:running; }
/* A thin warm beginning dissolves into a cooler line, using the shared rhythm. */
.section-heading::after {
  background:linear-gradient(90deg,#bca57755 0%,#a6b2c628 25%,#a6b2c608 76%,transparent 100%);
  transition-duration:var(--motion-spatial);
  transition-timing-function:var(--motion-ease-spatial);
}
[dir=rtl] .section-heading::after {
  background:linear-gradient(270deg,#bca57755 0%,#a6b2c628 25%,#a6b2c608 76%,transparent 100%);
}
/* Lines inside the existing headline release gently, without changing its type. */
.mf-motion-ready .hero-title > span,
.mf-motion-ready .hero-title > em {
  opacity:0;
  transform:translate3d(0,9px,0);
  transition:opacity var(--motion-reveal) var(--motion-ease),transform var(--motion-spatial) var(--motion-ease-spatial);
  transition-delay:var(--mf-title-delay,0ms);
}
.mf-motion-ready .hero-title > :nth-child(2) { --mf-title-delay:90ms; }
.mf-motion-ready .hero-title > :nth-child(3) { --mf-title-delay:170ms; }
.mf-motion-ready .hero-title.mf-shown > span,
.mf-motion-ready .hero-title.mf-shown > em { opacity:1;transform:none; }
.mf-motion-ready .mf-image img {
  transform:scale(1.018);
  transition:transform var(--motion-spatial) var(--motion-ease-spatial);
}
.mf-motion-ready .mf-image.mf-shown img { transform:scale(1); }
@keyframes mf-atmosphere-drift {
  from { transform:translate3d(-1%,0,0); }
  to { transform:translate3d(1.3%,-1.8%,0); }
}
@keyframes mf-soft-light {
  from { transform:translate3d(-1%,1%,0) scale(1);opacity:.58; }
  to { transform:translate3d(2%,-1%,0) scale(1.025);opacity:.8; }
}
@keyframes mf-orbit-trace {
  from { transform:translate3d(0,0,0) rotate(-29deg); }
  to { transform:translate3d(1.5%,-1%,0) rotate(-26.5deg); }
}
@keyframes mf-orbit-trace-secondary {
  from { transform:translate3d(0,0,0) rotate(-26deg); }
  to { transform:translate3d(-1%,1%,0) rotate(-24.5deg); }
}
@media(max-width:760px),(hover:none),(pointer:coarse) {
  :root { --atmosphere-grain:.016; }
  body::before { animation:none;transform:none;inset:0;opacity:.72; }
  .hero .nebula,.hero .light-path { animation:none; }
  .hero .nebula { transform:none;opacity:.52; }
  .hero .light-path { opacity:.4; }
  .mf-motion-ready .hero-title > span,.mf-motion-ready .hero-title > em { transform:none;--mf-title-delay:0ms; }
}
@media(prefers-reduced-motion:reduce) {
  body::before,.hero .nebula,.hero .light-path { animation:none!important; }
  body::before { transform:none; }
  .mf-motion-ready .hero-title > span,.mf-motion-ready .hero-title > em,
  .mf-motion-ready .mf-image img { opacity:1;transform:none;transition:none; }
}
@media print {
  body::before,body::after { display:none; }
}
