/* Stellaria Physical Waterfield — work49
   Final layout/visual override. WebGPU owns the Hero optical field; CSS owns robust fallback and UI glass. */
:root{
  --w49-bg:#f4f6fa;--w49-bg2:#edf1f7;--w49-ink:#111925;--w49-soft:rgba(17,25,37,.67);--w49-muted:rgba(17,25,37,.44);
  --w49-line:rgba(47,69,105,.10);--w49-line-hi:rgba(84,119,180,.20);--w49-glass:rgba(255,255,255,.28);--w49-glass-hi:rgba(255,255,255,.48);
  --w49-blue:#607fc8;--w49-violet:#8072c8;--w49-shadow:0 26px 84px rgba(37,51,78,.10);--w49-ease:cubic-bezier(.16,1,.3,1);
}
html[data-theme="dark"]{
  --w49-bg:#010207;--w49-bg2:#030711;--w49-ink:#f4f7fb;--w49-soft:rgba(230,237,247,.68);--w49-muted:rgba(207,219,237,.43);
  --w49-line:rgba(218,230,255,.075);--w49-line-hi:rgba(132,166,238,.19);--w49-glass:rgba(5,10,18,.14);--w49-glass-hi:rgba(14,23,37,.27);
  --w49-blue:#91adff;--w49-violet:#b0a2fb;--w49-shadow:0 28px 92px rgba(0,0,0,.24);
}

/* One true page background. Do not make sticky ancestors scrolling containers. */
html{width:100%;max-width:100%;overflow-x:clip!important;background:var(--w49-bg)!important}
body{width:100%;max-width:100%;overflow-x:clip!important;background:var(--w49-bg)!important;color:var(--w49-ink)!important}
html[data-theme="dark"],html[data-theme="dark"] body{background:#010207!important}
body.home-public-v3 main{overflow:visible!important;background:transparent!important}
html.stellaria-embedded,html.stellaria-embedded body{background:transparent!important}
img,svg,canvas,iframe{max-width:100%}

/* Hero: procedural WebGPU canvas is the physical background. */
.nf-hero{
  position:relative!important;isolation:isolate!important;width:100%!important;max-width:100%!important;overflow:hidden!important;
  background:linear-gradient(180deg,#f7f9fc 0%,#eef2f7 100%)!important;
}
html[data-theme="dark"] .nf-hero{background:linear-gradient(180deg,#010207 0%,#01040a 45%,#040a14 100%)!important}
.nf-hero::before,.nf-hero::after{opacity:0!important;animation:none!important;pointer-events:none!important}
.w49-liquid-canvas{position:absolute;inset:0;z-index:0;width:100%;height:100%;pointer-events:none;display:block}
.nf-hero-copy,.nf-constellation{position:relative;z-index:3!important}
.nf-hero-copy{filter:drop-shadow(0 12px 30px rgba(0,0,0,.08))}
.nf-hero.w49-liquid-fallback::before{
  opacity:.38!important;content:""!important;position:absolute!important;display:block!important;z-index:0!important;inset:-12% -8% -10% 40%!important;
  background:repeating-conic-gradient(from 18deg at 62% 48%,rgba(153,188,255,.11) 0 5deg,transparent 11deg 25deg),radial-gradient(52% 42% at 56% 48%,rgba(90,132,230,.12),transparent 74%)!important;
  filter:blur(14px) contrast(1.2)!important;mix-blend-mode:screen!important;animation:w49FallbackFlow 12s ease-in-out infinite alternate!important;
}
@keyframes w49FallbackFlow{from{transform:translate3d(-2%,-1%,0) scale(1.02) rotate(-1deg)}to{transform:translate3d(2%,2%,0) scale(1.07) rotate(1deg)}}

/* Constellation remains crisp; WebGPU draws the deforming liquid lens under it. */
.nf-constellation{background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important}
.nf-constellation::after{display:none!important}
.nf-constellation-lines path{stroke:color-mix(in srgb,var(--w49-blue) 40%,var(--w49-line))!important;stroke-width:.9!important;opacity:.48!important;filter:none!important;transition:opacity .3s ease,stroke .3s ease!important}
.nf-constellation.is-snapped .nf-constellation-lines path{opacity:.72!important;stroke:color-mix(in srgb,var(--w49-blue) 60%,var(--w49-line))!important}
.nf-star-node{overflow:visible!important;background:transparent!important;border:0!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;transition:transform .48s var(--w49-ease),opacity .25s ease!important}
.nf-star-node::after{
  display:block!important;content:""!important;position:absolute!important;z-index:0!important;left:50%!important;top:50%!important;inset:auto!important;
  width:calc(100% + 22px)!important;height:calc(100% + 18px)!important;transform:translate(-50%,-50%) scale(.72)!important;opacity:0!important;
  border:1px solid transparent!important;border-radius:58% 42% 54% 46%/45% 58% 42% 55%!important;
  background:linear-gradient(145deg,color-mix(in srgb,var(--w49-glass-hi) 56%,transparent),color-mix(in srgb,var(--w49-glass) 86%,transparent))!important;
  box-shadow:inset 0 1px rgba(255,255,255,.16),inset 0 -1px rgba(90,135,230,.06)!important;
  backdrop-filter:blur(9px) saturate(168%) brightness(1.035)!important;-webkit-backdrop-filter:blur(9px) saturate(168%) brightness(1.035)!important;
  transition:opacity .28s ease,transform .55s var(--w49-ease),border-radius .62s var(--w49-ease)!important;pointer-events:none!important;
}
.nf-star-node.is-nearest::after,.nf-star-node:hover::after,.nf-star-node:focus-visible::after{opacity:.42!important;transform:translate(-50%,-50%) scale(1)!important;border-color:var(--w49-line)!important;border-radius:45% 55% 46% 54%/57% 43% 56% 44%!important}
.nf-star-node strong,.nf-star-node small,.nf-star-node::before{position:relative;z-index:2!important}.f2-node-ripple{display:none!important}

/* Studio/Principle glass: transmitted material instead of grey cards. */
.home-public-v3 .home-studio-section{position:relative!important;background:radial-gradient(860px 520px at 74% 12%,color-mix(in srgb,var(--w49-blue) 6%,transparent),transparent 72%)!important}
html[data-theme="dark"] .home-public-v3 .home-studio-section{background:radial-gradient(860px 520px at 74% 12%,rgba(70,108,190,.075),transparent 72%),linear-gradient(180deg,#040a13,#02050a)!important}
.home-public-v3 .studio-direction,.home-public-v3 .studio-principle,.home-public-v3 .nf-video-stage{
  background:linear-gradient(145deg,color-mix(in srgb,var(--w49-glass-hi) 62%,transparent),color-mix(in srgb,var(--w49-glass) 91%,transparent))!important;
  border:1px solid var(--w49-line)!important;box-shadow:var(--w49-shadow),inset 0 1px rgba(255,255,255,.12)!important;
  backdrop-filter:blur(30px) saturate(175%) brightness(1.02)!important;-webkit-backdrop-filter:blur(30px) saturate(175%) brightness(1.02)!important;
}
html[data-theme="dark"] .home-public-v3 .studio-direction,html[data-theme="dark"] .home-public-v3 .studio-principle{background:linear-gradient(145deg,rgba(15,26,42,.20),rgba(3,8,15,.12))!important}
.home-public-v3 .studio-direction:hover{transform:translateY(-4px) scale(1.004)!important;box-shadow:0 30px 92px rgba(0,0,0,.16),inset 0 1px rgba(255,255,255,.15)!important}

/* Pinned Compute: no overflow/transform on sticky ancestors. */
.nf-production{position:relative!important;min-height:420svh!important;height:auto!important;overflow:visible!important;contain:none!important;transform:none!important;background:transparent!important}
html[data-theme="dark"] .nf-production{background:radial-gradient(900px 560px at 76% 46%,rgba(42,74,148,.055),transparent 72%),#020407!important}
.nf-production-stage{position:sticky!important;top:0!important;height:100svh!important;min-height:100svh!important;overflow:visible!important;contain:none!important;transform:none!important;filter:none!important;box-sizing:border-box!important}
.nf-story-stack{position:relative!important;min-height:0!important;overflow:visible!important}
.nf-story{position:absolute!important;inset:0!important;overflow:visible!important}
.nf-story-visual{position:relative!important;border:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;overflow:visible!important}
.nf-story-visual::before{display:none!important}
.f2-mono{width:min(48%,360px)!important;max-height:42vh!important;overflow:visible!important;filter:drop-shadow(0 0 18px color-mix(in srgb,var(--w49-blue) 7%,transparent))}
.f2-mono text{display:none!important}.f2-mono .fill{fill:transparent!important}.f2-mono .soft{fill:none!important;stroke:color-mix(in srgb,var(--w49-blue) 17%,transparent)!important;stroke-width:.9!important}.f2-mono .line{fill:none!important;stroke:color-mix(in srgb,var(--w49-blue) 46%,transparent)!important;stroke-width:1!important}.f2-mono .node{fill:color-mix(in srgb,var(--w49-bg) 72%,transparent)!important;stroke:color-mix(in srgb,var(--w49-blue) 74%,transparent)!important;stroke-width:1.1!important}
.nf-story.is-active .f2-mono .line{stroke-dasharray:10 10;animation:w49Trace 5.2s linear infinite}.nf-story.is-active .f2-mono .node{animation:w49Node 4.6s ease-in-out infinite}
@keyframes w49Trace{to{stroke-dashoffset:-80}}@keyframes w49Node{50%{opacity:.52}}

/* Seamless Worlds -> Video transition. */
.home-public-v3 .nf-worlds-home{margin-bottom:0!important;box-shadow:none!important;border-bottom-color:transparent!important;position:relative!important}
.home-public-v3 .nf-worlds-home::after{content:"";position:absolute;z-index:4;left:0;right:0;bottom:-1px;height:96px;pointer-events:none;background:linear-gradient(180deg,transparent 0%,rgba(1,3,7,.42) 56%,#020307 100%)}
.home-public-v3 #official-video{margin-top:0!important;border-top:0!important;box-shadow:none!important;position:relative!important;background:#020307!important}
.home-public-v3 #official-video::before,.home-public-v3 #official-video .section-heading::before,.home-public-v3 #official-video .section-heading::after{display:none!important}
html[data-theme="light"] .home-public-v3 .nf-worlds-home::after{background:linear-gradient(180deg,transparent,#f3f5f9 100%)}
html[data-theme="light"] .home-public-v3 #official-video{background:#f3f5f9!important}

/* Signature: the section scrolls, the stage stays centered, then holds the formed mark. */
.nf-signature-field{position:relative!important;min-height:280svh!important;height:auto!important;overflow:visible!important;background:#000!important;isolation:isolate!important}
.nf-signature-stage{position:sticky!important;top:0!important;height:100svh!important;overflow:hidden!important;display:grid!important;place-items:center!important;background:radial-gradient(720px 420px at 50% 50%,rgba(62,93,160,.045),transparent 76%),#000!important}
.nf-signature-stage canvas{position:absolute!important;inset:0!important;width:100%!important;height:100%!important;display:block!important}
.nf-signature-fallback{position:absolute!important;left:50%!important;top:50%!important;transform:translate(-50%,-50%)!important;width:min(620px,58vw)!important;opacity:0!important;pointer-events:none!important}
.nf-signature-caption{position:absolute!important;left:50%!important;bottom:10%!important;transform:translateX(-50%)!important;color:rgba(208,220,240,.34)!important;letter-spacing:.17em!important}
html[data-theme="light"] .nf-signature-field,html[data-theme="light"] .nf-signature-stage{background:radial-gradient(720px 420px at 50% 50%,rgba(77,104,158,.055),transparent 76%),#f2f4f8!important}.nf-signature-field.is-static .nf-signature-fallback{opacity:.72!important}

/* Footer: one brand block + one License link. */
html.stellaria-embedded body .footer,html.stellaria-embedded body .compact-footer{display:flex!important}
.footer.compact-footer{width:min(1240px,calc(100% - 48px))!important;margin:0 auto 24px!important;padding:24px 4px!important;display:flex!important;align-items:flex-end!important;justify-content:space-between!important;gap:24px!important;border:0!important;border-top:1px solid var(--w49-line)!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;backdrop-filter:none!important;-webkit-backdrop-filter:none!important;color:var(--w49-ink)!important}
.footer.compact-footer>div:first-child{display:grid!important;gap:4px!important}.footer.compact-footer strong{font-size:14px!important;color:var(--w49-ink)!important}.footer.compact-footer p{margin:0!important;font-size:11px!important;color:var(--w49-muted)!important}.footer.compact-footer .footer-links{display:flex!important;align-items:center!important;gap:0!important}.footer.compact-footer .footer-links a{display:none!important}.footer.compact-footer .footer-links a[href*="license"],.footer.compact-footer .footer-links a[data-w49-license]{display:inline-flex!important;color:var(--w49-soft)!important;font-size:12px!important;text-decoration:none!important;padding:8px 0!important}.footer.compact-footer .footer-links a:hover{color:var(--w49-ink)!important}

/* Platform tuning. */
@media(min-width:1260px){.nf-production-stage{padding-top:clamp(92px,9vh,122px)!important;padding-bottom:34px!important}.nf-story{grid-template-columns:minmax(360px,.9fr) minmax(520px,1.1fr)!important;gap:clamp(48px,7vw,96px)!important}}
@media(min-width:820px) and (max-width:1259px){.nf-production-stage{padding:74px 28px 22px!important}.nf-production .nf-section-head{margin-bottom:4px!important}.nf-story{grid-template-columns:minmax(300px,.92fr) minmax(380px,1.08fr)!important;gap:28px!important}.nf-story-copy h3{font-size:clamp(44px,5.7vw,62px)!important;margin:12px 0 16px!important}.nf-story-copy p{font-size:14.5px!important;line-height:1.58!important}.f2-mono{width:min(46%,320px)!important}}
@media(max-height:780px) and (min-width:820px){.nf-production-stage{padding-top:64px!important}.nf-production .nf-section-head h2{font-size:44px!important}.nf-production .nf-section-head>p{font-size:13px!important}.nf-story-copy h3{font-size:48px!important}.nf-story-copy p{font-size:13.5px!important}.f2-mono{max-height:32vh!important}}
@media(max-width:819px){.nf-production{min-height:auto!important}.nf-production-stage{position:relative!important;height:auto!important;min-height:0!important;padding:78px 18px 44px!important}.nf-story-stack{display:grid!important;gap:52px!important}.nf-story{position:relative!important;inset:auto!important;opacity:1!important;transform:none!important;pointer-events:auto!important;grid-template-columns:1fr!important;gap:18px!important}.nf-story-visual{height:260px!important}.f2-mono{width:min(58%,300px)!important}.nf-signature-field{min-height:220svh!important}.nf-signature-fallback{width:min(76vw,440px)!important}.footer.compact-footer{width:calc(100% - 28px)!important;padding:20px 0!important}}
@media(prefers-reduced-motion:reduce){.wf-gpu-canvas,.w49-liquid-canvas{display:none!important}.nf-story.is-active .f2-mono .line,.nf-story.is-active .f2-mono .node{animation:none!important}.nf-signature-field{min-height:auto!important}.nf-signature-stage{position:relative!important;height:64svh!important}.nf-signature-fallback{opacity:.72!important}}
