/* Experimental theme, now based on Retro city (v1). Future mixed-theme edits go here. */
/* Viewport wallpaper: CSS sunset and moving floor, layered vector city. */
body{isolation:isolate}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-wallpaper{position:fixed;inset:0;height:100vh;height:100svh;--skyline:58%;background:radial-gradient(ellipse at 50% 24%,#ff734f88,transparent 43%),linear-gradient(#57225d 0%,#b22d83 24%,#df5291 41%,#685eaf 56%,#332555 59%,#271333 80%,#691d64 100%)}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .sun{width:min(46vw,48svh);height:auto;aspect-ratio:1;left:50%;right:auto;top:auto;bottom:calc(100% - var(--skyline) - 1%);transform:translateX(-50%);border-radius:50%;opacity:1;background:linear-gradient(#fff04d 0%,#ffd45d 48%,#ff9f77 82%,#ef739b);box-shadow:0 0 85px #ffbd6230;mask-image:linear-gradient(to bottom,#000 0 58%,transparent 58% 58.5%,#000 58.5% 67%,transparent 67% 68%,#000 68% 75%,transparent 75% 77%,#000 77% 83%,transparent 83% 86%,#000 86% 91%,transparent 91% 95%,#000 95% 100%)}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city{position:absolute;left:50%;bottom:calc(100% - var(--skyline));width:max(100%,1450px);height:30%;transform:translateX(-50%);background:url("../../assets/images/site/retro-skyline.svg") center bottom/100% 100% no-repeat}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-floor{position:absolute;left:0;right:0;top:var(--skyline);bottom:0;overflow:hidden;perspective:360px;perspective-origin:50% 0;background:linear-gradient(#28204880,#77306844)}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{inset:auto;position:absolute;left:-100%;top:0;width:300%;height:2400px;transform:rotateX(65deg);transform-origin:50% 0;mask-image:none;background-image:linear-gradient(to right,#6acbff 1.5px,transparent 1.5px),linear-gradient(to bottom,#6acbff 1.5px,transparent 1.5px);background-size:100px 32px;opacity:.72;animation:retro-test-floor 2.8s linear infinite}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-wallpaper::after{content:"";position:absolute;left:0;right:0;top:calc(var(--skyline) - 2px);height:3px;background:#8de5ff;box-shadow:0 0 12px 4px #64d4ff88,0 0 32px 10px #65c8ff44}
/* Keep the desktop headings readable against the bright sky. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) #desktop-heading{position:relative;text-shadow:0 2px 10px #180b2d}

:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-footer{color:var(--text);text-shadow:0 1px 6px #160b25}
@keyframes retro-test-floor{from{background-position:0 0,0 0}to{background-position:0 0,0 32px}}
@media(max-width:700px){:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-wallpaper{--skyline:62%}:root:is([data-skin="neon-test"],[data-skin="terminal"]) .sun{width:88vw}:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city{width:1050px;height:24%}:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{background-size:75px 32px}}
@media(prefers-reduced-motion:reduce){:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{animation:none}}

/* Dim the scene uniformly while leaving the desktop content crisp. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-wallpaper::before{
  content:"";
  position:absolute;
  inset:0;
  z-index:1;
  pointer-events:none;
  background:rgba(17,9,30,.4);
}

/* Recovered personal sun: original size, center, colors and stripe spacing. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .sun{
  inset:0;
  width:100%;
  height:100%;
  aspect-ratio:auto;
  transform:scale(.75);
  transform-origin:50% 50%;
  border-radius:0;
  box-shadow:none;
  background:linear-gradient(to bottom,#ffdf86 15%,#ffc078 35%,#ff9d80 55%,#ed7fa1 75%);
  mask-image:
    radial-gradient(circle at center,#000 min(45vh,45vw),transparent min(45vh,45vw)),
    linear-gradient(
      #000 0 30vh,
      transparent 30vh 30.2vh,
      #000 30.2vh 35.2vh,
      transparent 35.2vh 36vh,
      #000 36vh 40vh,
      transparent 40vh 41.6vh,
      #000 41.6vh 45.1vh,
      transparent 45.1vh 48.6vh,
      #000 48.6vh 52.5vh,
      transparent 52.5vh 57.5vh,
      #000 57.5vh
    );
  mask-composite:intersect;
}

/* Cut the scaled sun at the shared skyline/floor horizon.
   Convert viewport horizon to the sun's coordinates before its 75% scale. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .sun{
  clip-path:polygon(
    0 0,100% 0,
    100% calc(50% + (var(--skyline) - 50%) / .75),
    0 calc(50% + (var(--skyline) - 50%) / .75)
  );
}

/* Independent recovered vector layers. Other skins keep these extra layers hidden. */
.wallpaper-mountain,.wallpaper-city-back{display:none}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-mountain{
  display:block;position:absolute;right:-3%;
  bottom:calc(100% - var(--skyline));
  width:clamp(600px,65vw,1000px);aspect-ratio:1473.51/352.66;
  background:url("../../assets/images/site/retro-test/mthood.svg") center bottom/contain no-repeat;
  opacity:.7;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city-back{
  display:block;position:absolute;left:0;right:0;
  bottom:calc(100% - var(--skyline));height:clamp(90px,17vh,190px);
  background:url("../../assets/images/site/retro-test/cityone.svg") center bottom/auto 100% repeat-x;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city{
  width:clamp(800px,78vw,1400px);height:auto;aspect-ratio:549.23/153.32;
  background:url("../../assets/images/site/retro-test/citytwo.svg") center bottom/contain no-repeat;
}
@media(max-width:700px){
  :root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city{width:800px}
  :root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-mountain{right:-260px;bottom:calc(100% - var(--skyline))}
}

/* Repeating distant range, behind the sun and other scene layers. */
.wallpaper-distant-mountains{display:none}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-distant-mountains{
  display:block;position:absolute;left:0;right:0;
  bottom:calc(100% - var(--skyline));
  height:clamp(60px,12vh,140px);
  background:url("../../assets/images/site/retro-test/backgroundMountains.svg") center bottom/auto 100% repeat-x;
  opacity:.65;
}

/* Keep the city-free mountain composition shown in Ryan’s review. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city,
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city-back{display:none}

/* Hood shares the range's angular shading; opaque layers block the sun. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-mountain{
  background-image:url("../../assets/images/site/retro-test/mthood-faceted.svg");
  opacity:1;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-distant-mountains{opacity:1}

/* Updated city exports: peaked-tower city in front, bridge strip repeating behind. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city-back{
  display:block;
  background-image:url("../../assets/images/site/retro-test/citytwob.svg");
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-city{
  display:block;
  aspect-ratio:540.89/153.32;
  background-image:url("../../assets/images/site/retro-test/cityoneb.svg");
}

/* Bring Hood slightly forward and toward the center, keeping its base anchored. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-mountain{
  transform:translateX(-5vw) scale(1.15);
  transform-origin:50% 100%;
}

/* Keep the floor shading dimmed, but draw the blue grid above the scene veil.
   Perspective creates a stacking context, so move it onto the grid itself. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .wallpaper-floor{
  overflow:visible;
  perspective:none;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{
  z-index:2;
  transform:perspective(360px) rotateX(65deg);
}

/* A little more cyan in the grid, with a brighter leading horizon edge. */
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{
  background-image:linear-gradient(to right,#80d8ff 1.5px,transparent 1.5px),linear-gradient(to bottom,#80d8ff 1.5px,transparent 1.5px);
  opacity:.82;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .desktop-wallpaper::after{
  z-index:3;
  background:#b3f2ff;
  box-shadow:0 0 10px 2px #75dcff99,0 0 26px 6px #65c8ff55;
}

/* Screen-space vector ground keeps lines crisp without stretching a bitmap. */
.wallpaper-road{display:none}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon{
  left:0;top:0;width:100%;height:100%;
  transform:none;opacity:1;animation:none;mask-image:none;
  background:url("../../assets/images/site/retro-test/road-ground.svg") center/100% 100% no-repeat;
}
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon::before,
:root:is([data-skin="neon-test"],[data-skin="terminal"]) .horizon::after{display:none}

/* The terminal borrows the approved scene geometry and motion, in green phosphor. */
:root[data-skin="terminal"] .desktop-wallpaper{
  display:block;
  filter:grayscale(1) sepia(1) saturate(5) hue-rotate(65deg) brightness(.65);
}

/* WarGames-style black sky: retain phosphor sun, skyline, and road. */
:root[data-skin="terminal"] .desktop-wallpaper{background:#000}
