/* reframe v37 (2026-11-19), James on v36: "instead of stars, it can be like space...can float a little...must always be behind tiles
   in the background...goal is to give it depth and dimension". Replaces reframe-v36.css. Each dark chapter (01, 03, 05, 07) sits in
   deep space, three depths deep: far violet clouds, the nebula itself in the neon with softly lit edges, and dark dust lanes nearer
   the viewer. Each depth floats on its own slow clock and drifts with the scroll at its own rate, farther slower. It is all behind
   the work: z-index under every chapter's content, and 01's wall tiles are solid, fading into a dark fog laid over them, so nothing
   in the background shows through a tile. The maps (v37/*.webp) are masks, so the nebula takes the site's neon colour. Main site
   only (.rf2-platform). */

/* the chapter holds its own layers, and names the scroll timeline the space drifts on */
.rf2-platform :is(.v4-ink,.v10-care){isolation:isolate;view-timeline:--v37 block}

/* v35's light without its base: the base moves into the space, under the nebula */
.rf2-platform :is(.v4-ink,.v10-care){
  --v35-light:
    radial-gradient(150% 110% at 50% 45%,transparent 48%,rgb(0 0 0/.72) 100%),
    linear-gradient(180deg,rgb(0 0 0/.55),transparent 18%,transparent 80%,rgb(0 0 0/.45)),
    radial-gradient(58% 34% at 62% 0%,rgb(var(--n)/.26),transparent 72%),
    radial-gradient(34% 30% at 8% 46%,rgb(235 235 245/.05),transparent 70%),
    radial-gradient(78% 26% at 50% 104%,rgb(var(--n)/.22),transparent 72%)}

/* ---- the space ---- */
.rf2-platform .v37-space{position:absolute!important;top:0;bottom:0;left:0;right:0;z-index:-1!important;pointer-events:none;overflow:hidden;
  background:linear-gradient(180deg,#07060a,#0d0b11 42%,#09080c)}
.rf2-platform .v10-care>.v37-space{left:calc(50% - 50vw);right:calc(50% - 50vw)}
/* each depth runs past the chapter by its drift and float, so no edge ever shows */
.rf2-platform .v37-l{position:absolute;display:block;left:-150px;right:-150px}
.rf2-platform .v37-l i{position:absolute;top:0;bottom:0;left:0;right:0;display:block;-webkit-mask-repeat:repeat;mask-repeat:repeat}
.rf2-platform .v37-far{top:-380px;bottom:-380px}
.rf2-platform .v37-far i{background:color-mix(in srgb,rgb(var(--n)) 42%,rgb(64 56 196));opacity:.55;
  -webkit-mask-image:url(v37/far.webp);mask-image:url(v37/far.webp);-webkit-mask-size:2200px 2200px;mask-size:2200px 2200px}
.rf2-platform .v37-body{top:-240px;bottom:-240px}
.rf2-platform .v37-body i{-webkit-mask-size:1700px 1700px;mask-size:1700px 1700px}
.rf2-platform .v37-neb{background:rgb(var(--n));opacity:.42;-webkit-mask-image:url(v37/neb.webp);mask-image:url(v37/neb.webp)}
.rf2-platform .v37-glow{background:color-mix(in srgb,rgb(var(--n)) 50%,#fff);opacity:.36;mix-blend-mode:plus-lighter;
  -webkit-mask-image:url(v37/glow.webp);mask-image:url(v37/glow.webp)}
.rf2-platform .v37-dust{top:-140px;bottom:-140px}
.rf2-platform .v37-dust i{background:#040306;opacity:.72;-webkit-mask-image:url(v37/dust.webp);mask-image:url(v37/dust.webp);
  -webkit-mask-size:1700px 1700px;mask-size:1700px 1700px}
/* a different region of space in each chapter */
.rf2-platform #intro .v37-l i{-webkit-mask-position:-1060px 200px;mask-position:-1060px 200px}
.rf2-platform #craft .v37-l i{-webkit-mask-position:-520px -840px;mask-position:-520px -840px}
.rf2-platform :is(#approach,#rounds) .v37-l i{-webkit-mask-position:-1060px -300px;mask-position:-1060px -300px}
.rf2-platform #care .v37-l i{-webkit-mask-position:-260px -1240px;mask-position:-260px -1240px}

/* ---- 01: the wall's tiles stay solid and fade into a fog laid over them, so the space never shows through a tile ---- */
.rf2-platform #intro .v4-wall{-webkit-mask-image:none!important;mask-image:none!important}
.rf2-platform #intro .v4-wall::after{content:"";position:absolute;top:0;bottom:-1px;left:calc(50% - 50vw);right:calc(50% - 50vw);z-index:2;
  pointer-events:none;background:
    radial-gradient(62% 34% at 50% 106%,rgb(var(--n)/.2),transparent 72%),
    radial-gradient(118% 104% at 50% 0%,transparent 50%,rgb(6 5 9/.9) 84%,#060509 100%)}

/* ---- 05: the step tabs were see-through; now solid, so the space stays behind them ---- */
.rf2-platform .v34-tabs{background:linear-gradient(rgb(255 255 255/.06),rgb(255 255 255/.06)),#0d0c11}

/* ---- depth in motion: each layer floats on its own slow clock, and drifts with the scroll, farther slower ---- */
@keyframes v37-far{from{translate:0 -300px}to{translate:0 300px}}
@keyframes v37-body{from{translate:0 -170px}to{translate:0 170px}}
@keyframes v37-dust{from{translate:0 -70px}to{translate:0 70px}}
@keyframes v37-float-a{from{transform:translate3d(-30px,14px,0) scale(1.04) rotate(-.5deg)}to{transform:translate3d(32px,-12px,0) scale(1.08) rotate(.5deg)}}
@keyframes v37-float-b{from{transform:translate3d(40px,-12px,0) scale(1.03) rotate(.7deg)}to{transform:translate3d(-38px,16px,0) scale(1.06) rotate(-.6deg)}}
@keyframes v37-float-c{from{transform:translate3d(-54px,-10px,0) scale(1.02)}to{transform:translate3d(50px,12px,0) scale(1.05)}}
@keyframes v37-breathe{0%,100%{opacity:.36}50%{opacity:.22}}
@media (prefers-reduced-motion:no-preference){
  .rf2-platform .v37-far{animation:v37-float-a 86s ease-in-out infinite alternate}
  .rf2-platform .v37-body{animation:v37-float-b 64s ease-in-out -22s infinite alternate}
  .rf2-platform .v37-dust{animation:v37-float-c 48s ease-in-out -11s infinite alternate}
  .rf2-platform .v37-glow{animation:v37-breathe 15s ease-in-out infinite}
  @supports (animation-timeline:view()){
    .rf2-platform .v37-far{animation:v37-float-a 86s ease-in-out infinite alternate,v37-far linear both;animation-timeline:auto,--v37}
    .rf2-platform .v37-body{animation:v37-float-b 64s ease-in-out -22s infinite alternate,v37-body linear both;animation-timeline:auto,--v37}
    .rf2-platform .v37-dust{animation:v37-float-c 48s ease-in-out -11s infinite alternate,v37-dust linear both;animation-timeline:auto,--v37}
  }
}

/* ---- phones: the same space, half the drift and float ---- */
@media (max-width:700px){
  @keyframes v37-far{from{translate:0 -150px}to{translate:0 150px}}
  @keyframes v37-body{from{translate:0 -85px}to{translate:0 85px}}
  @keyframes v37-dust{from{translate:0 -35px}to{translate:0 35px}}
  @keyframes v37-float-a{from{transform:translate3d(-15px,7px,0) scale(1.03) rotate(-.4deg)}to{transform:translate3d(16px,-6px,0) scale(1.05) rotate(.4deg)}}
  @keyframes v37-float-b{from{transform:translate3d(20px,-6px,0) scale(1.02) rotate(.5deg)}to{transform:translate3d(-19px,8px,0) scale(1.04) rotate(-.4deg)}}
  @keyframes v37-float-c{from{transform:translate3d(-27px,-5px,0) scale(1.02)}to{transform:translate3d(25px,6px,0) scale(1.04)}}
  .rf2-platform .v37-l{left:-80px;right:-80px}
  .rf2-platform .v37-far i{-webkit-mask-size:1500px 1500px;mask-size:1500px 1500px}
  .rf2-platform :is(.v37-body,.v37-dust) i{-webkit-mask-size:1150px 1150px;mask-size:1150px 1150px}
}
